Skip to content
Alea0.1

Data display

SortableList and KanbanBoard

Reorder items, or move cards between columns, by dragging or with the keyboard.

Ant Design: Pro kanban, dnd-kit sortable

import { SortableList, KanbanBoard } from '@alea/ui';

Examples

Sortable list

Drag the handle, or focus it, press Enter, move with the arrows and press Enter again.

Ship chartsLine, bar, pie
Data grid
Figma kit pages
Templates

Kanban board

Move cards between columns by dragging or with the keyboard.

To do

2
Chart docsDocs
Figma spec framesFigma

In progress

1
DataGrid editingCode

Done

1
Tokens v2Done

Props

SortableList props

Reorder by dragging the handle, or with the keyboard: focus the handle, Enter to pick up, arrows to move, Enter to drop (Mantine/dnd-kit sortable).

PropTypeDefaultDescription
aria-labelrequiredstring-Name of the list for screen readers.
itemsrequiredT[]-The items: id, label, optional description.
classNamestring-Extra class names for the root element.
onReorder((items: T[]) => void)-Called with the new order after a move.
renderItem((item: T) => ReactNode)-Renders the item content (default: label and description).

KanbanBoard props

Cards in columns you drag between, with the keyboard too (Ant Pro kanban, Trello-style).

PropTypeDefaultDescription
cardsrequiredT[]-The cards: id, title, column (a column id) and optional meta.
columnsrequired{ id: string; title: string; }[]-The columns, in order: id and title.
headingLevel2 | 3 | 43Heading level of the column titles, to fit the page outline. Default 3.
onChange((cards: T[]) => void)-Called with all cards after a move (column and order changed).
renderCard((card: T) => ReactNode)-Renders a card (default: title and meta).

Accessibility

  • Drag and drop from React Aria: focus the handle, press Enter to pick up, arrows or Tab to choose where, Enter to drop. Every move is announced.
  • Each column is a named grid list with a card count.

Keyboard

KeyDoes
Enter (on the handle)Picks up
Arrow keys / TabChoose the drop spot
EnterDrops
EscapeCancels

Do and don't

Do

  • Show card counts per column.
  • Give each card a meaningful title for the move announcement.

Don't

  • Don't rely on drag only: the keyboard path is built in, mention it.
  • Don't put more than six columns on one board.
Tested with axe, keyboard and screen reader roles