Components
Kanban
NativeColumns of cards that move between them by dragging or by keyboard.
Press Space to pick up a card, the arrow keys to move it, and Space again to drop it.
To do3
- MarketingWrite the pricing page copyThree plans, one plain sentence each.Priority: MediumDue Fri 14 Mar3 commentsAssigned to Maya Chen
- BugCheckout total is off by one centPriority: UrgentDue Tomorrow6 commentsAssigned to Imran Siddiqui, Dana Whitfield
- ContentPlan the March newsletterPriority: LowAssigned to Noor Haddad
In progress2 of 2
- DesignDesign the empty statesInbox, search and reports.Priority: HighDue Wed 12 Mar2 commentsAssigned to Maya Chen
- EngineeringMove invoices to the new billing APIPriority: High9 commentsAssigned to Imran Siddiqui
In review1
- ProductOnboarding checklistFive steps, skippable, saved per person.Priority: MediumDue Thu 13 Mar4 commentsAssigned to Dana Whitfield, Noor Haddad
Done2
- EngineeringSet up the staging site1 commentsAssigned to Imran Siddiqui
- PlanningChoose the launch dateAssigned to Maya Chen
Installation
npx nook-ui@latest add kanbanPrompt
Paste this into your AI coding assistant. It adds this exact component, the same way the CLI does, and tells the assistant how to use it.
Short. For assistants that can run commands in your project.
Add the Nook "Kanban" component to this project, exactly as Nook ships it.
Columns of cards that move between them by dragging or by keyboard.
Steps
1. Check for `nook.json` in the project root. If it is missing, run `npx nook-ui@latest init` first (React or Next.js with Tailwind CSS v4). It adds the Nook tokens, the theme and `cn()`.
2. Run `npx nook-ui@latest add kanban`. It writes `components/ui/kanban.tsx` together with everything the component needs. Do not write the component from memory.
3. If you cannot run commands, fetch http://localhost:3000/r/kanban.json, write every entry of `files` to the path it names, install the packages in `dependencies`, and repeat for each name in `registryDependencies`.
4. Use it where I ask. Start from this example:
```tsx
import { Kanban, type KanbanColumn } from "@/components/ui/kanban";
const COLUMNS: KanbanColumn[] = [
{
id: "todo",
title: "To do",
tone: 5,
cards: [
{ id: "t1", title: "Write the pricing page copy", description: "Three plans, one plain sentence each.", labels: [{ text: "Marketing", tone: 2 }], priority: "medium", due: "Fri 14 Mar", assignees: ["Maya Chen"], comments: 3 },
{ id: "t2", title: "Checkout total is off by one cent", labels: [{ text: "Bug", tone: 5 }], priority: "urgent", due: "Tomorrow", assignees: ["Imran Siddiqui", "Dana Whitfield"], comments: 6 },
{ id: "t3", title: "Plan the March newsletter", labels: [{ text: "Content", tone: 3 }], priority: "low", assignees: ["Noor Haddad"] },
],
},
{
id: "doing",
title: "In progress",
tone: 1,
limit: 2,
cards: [
{ id: "d1", title: "Design the empty states", description: "Inbox, search and reports.", labels: [{ text: "Design", tone: 1 }], priority: "high", due: "Wed 12 Mar", assignees: ["Maya Chen"], comments: 2 },
{ id: "d2", title: "Move invoices to the new billing API", labels: [{ text: "Engineering", tone: 4 }], priority: "high", assignees: ["Imran Siddiqui"], comments: 9 },
],
},
{ id: "review", title: "In review", tone: 3, cards: [{ id: "r1", title: "Onboarding checklist", description: "Five steps, skippable, saved per person.", labels: [{ text: "Product", tone: 2 }], priority: "medium", due: "Thu 13 Mar", assignees: ["Dana Whitfield", "Noor Haddad"], comments: 4 }] },
{ id: "done", title: "Done", tone: 4, cards: [{ id: "n1", title: "Set up the staging site", labels: [{ text: "Engineering", tone: 4 }], assignees: ["Imran Siddiqui"], comments: 1 }, { id: "n2", title: "Choose the launch date", labels: [{ text: "Planning", tone: 3 }], assignees: ["Maya Chen"] }] },
];
export default function KanbanDefault() {
return <Kanban aria-label="Launch board" defaultValue={COLUMNS} />;
}
```
API
- `Kanban`: The board.
- `value` (`KanbanColumn[]`): Controlled columns: `{ id, title, tone?, limit?, cards }`. A card is `{ id, title, description?, labels?, priority?, due?, assignees?, comments?, footer? }`. `tone` (1 to 5) colors the column marker, `limit` is a work-in-progress limit that warns when passed.
- `defaultValue` (`KanbanColumn[]`): Initial columns when uncontrolled.
- `onValueChange` (`(columns: KanbanColumn[]) => void`): Called after every move.
- `renderCard` (`(card) => ReactNode`): Replace the inside of a card.
- `emptyText` (`string`, default "Nothing here yet"): Shown in an empty column.
- `onAddCard` (`(columnId: string) => void`): Shows an add button in each column header.
Rules
- Colors, radii, shadows and motion come from Nook tokens and classes such as `bg-primary`, `text-muted-foreground`, `border-border`, `rounded-lg` and `h-control`. Never hard-code them.
- Do not restyle or simplify the file. Change how it looks through `className`, its props and the theme.
- It must keep working with the keyboard, in light and dark mode, and in the sharp, soft and bold styles.
- Accessibility: Cards are buttons: press Space to pick one up, the arrow keys to move it, Space to drop and Escape to put it back. Every move is announced with the new position. Dragging with a mouse is a shortcut, not the only way.
Done when the component renders like the example in light and dark mode and the project type-checks.Usage
import { Kanban, type KanbanColumn } from "@/components/ui/kanban";
const COLUMNS: KanbanColumn[] = [
{
id: "todo",
title: "To do",
tone: 5,
cards: [
{ id: "t1", title: "Write the pricing page copy", description: "Three plans, one plain sentence each.", labels: [{ text: "Marketing", tone: 2 }], priority: "medium", due: "Fri 14 Mar", assignees: ["Maya Chen"], comments: 3 },
{ id: "t2", title: "Checkout total is off by one cent", labels: [{ text: "Bug", tone: 5 }], priority: "urgent", due: "Tomorrow", assignees: ["Imran Siddiqui", "Dana Whitfield"], comments: 6 },
{ id: "t3", title: "Plan the March newsletter", labels: [{ text: "Content", tone: 3 }], priority: "low", assignees: ["Noor Haddad"] },
],
},
{
id: "doing",
title: "In progress",
tone: 1,
limit: 2,
cards: [
{ id: "d1", title: "Design the empty states", description: "Inbox, search and reports.", labels: [{ text: "Design", tone: 1 }], priority: "high", due: "Wed 12 Mar", assignees: ["Maya Chen"], comments: 2 },
{ id: "d2", title: "Move invoices to the new billing API", labels: [{ text: "Engineering", tone: 4 }], priority: "high", assignees: ["Imran Siddiqui"], comments: 9 },
],
},
{ id: "review", title: "In review", tone: 3, cards: [{ id: "r1", title: "Onboarding checklist", description: "Five steps, skippable, saved per person.", labels: [{ text: "Product", tone: 2 }], priority: "medium", due: "Thu 13 Mar", assignees: ["Dana Whitfield", "Noor Haddad"], comments: 4 }] },
{ id: "done", title: "Done", tone: 4, cards: [{ id: "n1", title: "Set up the staging site", labels: [{ text: "Engineering", tone: 4 }], assignees: ["Imran Siddiqui"], comments: 1 }, { id: "n2", title: "Choose the launch date", labels: [{ text: "Planning", tone: 3 }], assignees: ["Maya Chen"] }] },
];
export default function KanbanDefault() {
return <Kanban aria-label="Launch board" defaultValue={COLUMNS} />;
}Examples
Compact board
Press Space to pick up a card, the arrow keys to move it, and Space again to drop it.
Inbox3
- Reply to the vendor about the quote
- Book the team offsite venue
- Renew the domain
Doing1
- Draft the Q1 planPriority: High
Done2
- Send the invoice run
- Order new badges
A column over its limit
“In progress” holds three cards and its limit is two. Finish one before you pull the next.
Press Space to pick up a card, the arrow keys to move it, and Space again to drop it.
Ready2
- Add CSV export to reportsPriority: MediumAssigned to Noor Haddad
- BugFix the broken avatar uploadPriority: High
In progress3 of 2 over the limit
- Migrate sessions to RedisPriority: HighDue Fri 14 MarAssigned to Imran Siddiqui
- Rebuild the settings page4 commentsAssigned to Maya Chen
- Audit the email templatesPriority: LowAssigned to Dana Whitfield
Done1 of 10
- Upgrade to React 19Assigned to Imran Siddiqui
With add buttons
Press Space to pick up a card, the arrow keys to move it, and Space again to drop it.
Ideas1
- Dark mode for the dashboard
Up next1
- Weekly digest emailPriority: Medium
Shipped0
- Nothing shipped yet
An empty board
Press Space to pick up a card, the arrow keys to move it, and Space again to drop it.
To do0
- Drop a card here, or add one to get started
In progress0
- Drop a card here, or add one to get started
Done0
- Drop a card here, or add one to get started
Custom cards
Press Space to pick up a card, the arrow keys to move it, and Space again to drop it.
New leads2
- Harbor Coffee Roasters$4,800 / yearDeal
- Lumen Dental$12,000 / yearDeal
In talks1
- Northwind Logistics$32,500 / yearDeal
Won1
- Pine & Ash Studio$8,200 / yearDeal
Props
Kanban
The board.
| Prop | Type | Default | Description |
|---|---|---|---|
| value | KanbanColumn[] | – | Controlled columns: `{ id, title, tone?, limit?, cards }`. A card is `{ id, title, description?, labels?, priority?, due?, assignees?, comments?, footer? }`. `tone` (1 to 5) colors the column marker, `limit` is a work-in-progress limit that warns when passed. |
| defaultValue | KanbanColumn[] | – | Initial columns when uncontrolled. |
| onValueChange | (columns: KanbanColumn[]) => void | – | Called after every move. |
| renderCard | (card) => ReactNode | – | Replace the inside of a card. |
| emptyText | string | "Nothing here yet" | Shown in an empty column. |
| onAddCard | (columnId: string) => void | – | Shows an add button in each column header. |
Accessibility
Cards are buttons: press Space to pick one up, the arrow keys to move it, Space to drop and Escape to put it back. Every move is announced with the new position. Dragging with a mouse is a shortcut, not the only way.
Checked against WCAG 2.1 AA with automated axe tests and keyboard tests on every release.