Skip to content
Haze UI

Kanban board

Work items in lanes such as Now, Next and Later. Cards can be dragged, or moved by keyboard, between and within lanes.

pnpm dlx shadcn@latest add @haze/kanban-board
Open preview in a new tab
Livesmall script

When to use

  • A dashboard shows what is being worked on now and what comes after
  • A small team or a solo maker plans a few dozen items across stages

When not to use

  • Items need sorting, filtering or many columns of data. Use table.
  • The order of events in time is the point. Use timeline.

Installation

Add the Haze registry to components.json once, then install Kanban board with the shadcn CLI. Works in any Astro project with Tailwind CSS v4.

pnpm dlx shadcn@latest add @haze/kanban-board
First time? Registry and theme setup

1. Add to components.json:

{
  "registries": {
    "@haze": "http://localhost:4329/r/{name}.json"
  }
}

2. Install the theme once: npx shadcn@latest add @haze/theme, then import it after Tailwind in your global CSS:@import "./haze.css";

API reference

PropTypeDefaultDescription
labelstring"Work board"Accessible name of the board.
lanes{ title: string; cards: { title: string; meta?: string; tag?: { label: string; variant?: Tone }; href?: string }[] }[]–Lanes in display order, each with its cards.
emptyLabelstring"Nothing here."Text shown in a lane that has no cards.
moveLabelstring"Move card"Accessible name prefix of each card's move handle, shown once scripts run.
headingLevel2 | 3 | 43Heading level of the lane titles.
classstring–Additional classes on the board.

Keyboard interactions

Tab
Move between linked cards and move handles.
Space or Enter on a handle
Pick up the card, then drop it where it is.
Arrow keys (picked up)
Left and Right move the card to the neighboring lane, Up and Down reorder it within the lane.
Escape (picked up)
Cancel the move and put the card back.

Accessibility

  • Each lane title is a heading with its item count, so screen reader users can jump between lanes.
  • Priority tags carry their meaning in text (P0, P1); the color only repeats it.
  • With scripts on, each card gets a move handle button. Moves and drops are announced politely, for example "Moved 'X' to Next, position 2 of 3." Without scripts the board is a static list.

Notes for AI

Copy into Claude Code, Cursor, Codex or any coding agent. Agents can also read the Markdown version of this page.

  • Install and use

    Install the Haze UI component "Kanban board" with `npx shadcn@latest add @haze/kanban-board`. If components.json has no "@haze" registry yet, add "registries": { "@haze": "http://localhost:4329/r/{name}.json" }. If src/styles/haze.css does not exist yet, run `npx shadcn@latest add @haze/theme` once and import it from the global stylesheet after Tailwind. The CLI stops at an overwrite question when a Haze file already exists and differs, even with --yes, and then installs nothing after it: read its output. If the user has not edited their Haze files, re-run with --overwrite to take the registry versions; if they have, ask them before overwriting. Then import KanbanBoard from "@/components/haze/ui/kanban-board.astro" (or the relative path) and render it where it fits the page. Keep Haze token classes (bg-background, text-muted-foreground, border-border...) and never hardcode colors. Docs: http://localhost:4329/ui/kanban-board.md

  • Customize with real content

    Adapt the Haze kanban-board ui for our product. Replace the demo values of these props with our real content: label, lanes, emptyLabel, moveLabel, headingLevel, class. Keep the layout, the heading level rules and these accessibility details: Each lane title is a heading with its item count, so screen reader users can jump between lanes. Priority tags carry their meaning in text (P0, P1); the color only repeats it. With scripts on, each card gets a move handle button. Moves and drops are announced politely, for example "Moved 'X' to Next, position 2 of 3." Without scripts the board is a static list. Do not add raw color classes; use the Haze tokens.

  • Choose the right block

    Before using kanban-board, check it fits: use it when a dashboard shows what is being worked on now and what comes after; a small team or a solo maker plans a few dozen items across stages. Avoid it when items need sorting, filtering or many columns of data. use table.; the order of events in time is the point. use timeline.. Alternatives: @haze/table, @haze/timeline, @haze/sortable-list.

Dependencies

  • npm: @lucide/astro
  • @haze/tag
  • @haze/utils
  • @haze/theme (one-time setup)

Source · Original Haze UI work.

Catalog

↑↓ moveEnter openEsc close

Keyboard shortcuts

CtrlK
Command palette
/
Focus search
←↑→↓
Move between cards
jk
Next / previous card
ci
Copy code / install command (detail page)
[]
Previous / next entry
?
This help
Esc
Close dialog