Skip to content
nexubDesign System
v11.9.0

Components · Data Display

Kanban

BetaAdded v6.5.0

Columns of cards people move by dragging or with Alt+Arrow keys.

import { Kanban } from '@nexub/react';
View as Markdown

Playground

Props

To do2

  • Write release notesDocs
  • Update pricing page

In progress1

  • Billing migrationBackend

Done1

  • Hire designer
TSX
<Kanban columns={columns} getId={(t) => t.id} getLabel={(t) => t.title} onChange={setColumns} renderCard={…} />

Examples

Task board

To do2

  • Write release notesDocs
  • Update pricing page

In progress1

  • Billing migrationBackend

Done1

  • Hire designer

Workflow: lanes, WIP limit, archive

Ana

To do1

  • Renew SSL certificateHigh priority

Doing1 / 2

  • Migrate invoices

Done0

    Ben

    To do1

    • Update pricing page

    Doing0 / 2

      Done0

        Archive

          Archived: —

          States

          • To do2

            • Write release notesDocs
            • Update pricing page

            In progress1

            • Billing migrationBackend

            Done1

            • Hire designer
            default
          • To do2

            • Write release notesDocs
            • Update pricing page

            In progress1

            • Billing migrationBackend

            Done1

            • Hire designer
            readOnly
          • To do

            In progress

            Done

            loading

          Props

          Props
          PropTypeDefaultDescription
          columnsrequiredKanbanColumn<T>[]—The board.
          getIdrequired(item: T) => string—Stable key and the name read when it moves.
          getLabelrequired(item: T) => string—Stable key and the name read when it moves.
          onChangerequired(columns: KanbanColumn<T>[], move: KanbanMove<T>) => void—Called with the columns after a move; store them (and save to your server).
          renderCardrequired(item: T) => React.ReactNode—The card’s content.
          readOnlybooleanfalse11.4: no drag handles, no keyboard moves.
          canMove((move: KanbanMove<T>) => boolean)—11.4: refuse a target before the card lands (a WIP limit, a rule); the drop mark does not show and the keyboard announces it.
          dropTargetsKanbanDropTarget<T>[][]11.4: areas outside the columns (Archive, Trash). Alt+Arrow keys reach them after the last column.
          renderColumnHeader((column: KanbanColumn<T>, count: number) => React.ReactNode)—11.4: replace the header (WIP badge, actions); add a slot under the cards (quick add).
          renderColumnFooter((column: KanbanColumn<T>, lane?: KanbanLane) => React.ReactNode)—11.4: replace the header (WIP badge, actions); add a slot under the cards (quick add).
          lanesKanbanLane[]—11.4: swimlanes: one row of columns per lane.
          getLane((item: T) => string)—11.4: swimlanes: one row of columns per lane.
          getTone((item: T) => KanbanCardTone)—11.4: a coloured edge on the card; say the meaning in the card text too.
          columnWidth'sm' | 'md' | 'lg''md' (18rem)11.4: 15, 18 or 24rem.
          classNamestring—
          columnEmptyStateReact.ReactNode—Shown inside a column that has no cards (while other columns have some).
          emptyStateReact.ReactNode—Shown when there is no data. Defaults to the "no data" message.
          errorStateReact.ReactNode—Shown in place of the data when a load failed, for example an ErrorState with a retry action. Wins over loading and empty.
          loadingboolean—Shows a skeleton in place of the data and sets aria-busy.

          Accessibility

          Keyboard

          • Alt+ArrowUp / Alt+ArrowDown

            On a handle: moves the card within its column.

          • Alt+ArrowLeft / Alt+ArrowRight

            Moves the card to the previous or next column. Mirrored in RTL.

          Notes

          • Each column is a region named by its heading. Moves are announced: "Bravo moved to Done, position 2 of 2".

          On iOS & Android