Skip to content
Eskais UI

Layout

Board

Generic kanban layout: a named, horizontally scrolling list of columns with headers, counts, actions, collapsible columns agents can toggle by name, groups and an empty slot. With a value, cards move between columns by drag, keyboard and agents (UI SDK's createTransfer).

Example

  • Ideas

    2

    A field guide to city birds

    Pitched by the photo desk

    Night markets after the rain

    Needs a photographer
  • Drafting

    1

    Rooftop gardens, one year on

    Outline approved
  • Editing

    0

    Nothing here

Installation

npx shadcn@latest add @eskais/board

Usage

Import
import {  BoardItem,  BoardItemHandle,  BoardColumn,  BoardColumnGroup,  BoardList,  boardColumnLabels,  useBoardLists,  Board,} from "@/components/ui/board"import { BoardColumn, BoardColumnGroup, boardColumnLabels } from "@/components/ui/board-column"import { boardNavigation } from "@/components/ui/board-navigation-primitive"import {  BoardCard,  BoardNavigationProvider,  useBoardCardStop,  useBoardNavigation,} from "@/components/ui/board-navigation"import { boardTransfer } from "@/components/ui/board-transfer-primitive"import { BoardItem, BoardItemHandle, BoardList, BoardTransfer, useBoardLists } from "@/components/ui/board-transfer"

Give it value and onValueChange to move cards between columns; each BoardColumn value renders its cards.

API reference

Board

Takes Omit< ComponentProps<typeof ScrollArea>, "aria-label" | "aria-labelledby" | "children" | "defaultValue" > &.

BoardColumn

PropTypeDefault
titlerequiredstring–
valueThe column's list in a board that moves cards; its `children` function renders the list's cards.string–
countnumber | ReactNode–
actionsReactNode–
emptyReactNode–
headingLevelHeadingLevel3
toneMarks the column with a dot before the title, a top border and a faint wash in this tone.Tone–
collapsibleboolean–
collapsedboolean–
defaultCollapsedboolean–
onCollapsedChange(collapsed: boolean, details: ChangeDetails<CollapsibleOpenChangeReason>) => void–
labelsPartial<BoardColumnLabels>–
childrenThe cards, or, with `value` on a board that moves cards, a function from the column's card ids to them.ReactNode | ((ids: string[]) => ReactNode)–

Also takes <li> attributes except title, children, value.

BoardColumnGroup

PropTypeDefault
titlerequiredstring–
countnumber | ReactNode–

Also takes <section> attributes except title.

BoardNavigationProvider

PropTypeDefault
handlerequiredBoardNavigationHandle–
childrenrequiredReactNode–

BoardCard

PropTypeDefault
idrequiredstring–
renderrequiredReactElement–

BoardTransfer

PropTypeDefault
aria-labelstring–
aria-labelledbystring–
classNamestring–
childrenrequiredReactNode–

Also takes BoardTransferOptions.

BoardList

Takes ComponentProps.

BoardItem

PropTypeDefault
variant`card` (default) draws a card around the content; `plain` leaves it to the content, like a `TaskCard`.keyof typeof cardVariantClassNames"card"

Also takes ComponentProps.

BoardItemHandle

PropTypeDefault
labelThe card's name; the handle is called `labels.handle(label)`.string–
labelsPartial<TransferLabels>–
valuestring–

Also takes ComponentProps except value.

Other exports

boardColumnLabelsuseBoardListsboardNavigationuseBoardCardStopuseBoardNavigationboardTransfertype BoardItemHandlePropstype BoardItemPropstype BoardColumnLabelstype BoardColumnPropstype BoardColumnGroupPropstype BoardPropstype BoardNavigationOptionstype BoardCardStoptype BoardNavigationHandletype BoardMovetype BoardTransferAutoScrolltype BoardTransferChangeDetailstype BoardTransferOptionstype BoardTransferProps

Accessibility

  • A named, horizontally scrolling list of columns; each column is a region named by its title.
  • Moving cards, each column's cards are a list named by its title. Space lifts a card, Up and Down place it, Left and Right change columns, Space drops it and Escape puts it back; every step is announced.
  • With handle, a card moves by its BoardItemHandle, one tab stop for all of them, so the card's own buttons stay clickable.

Agent actions

Agents get move(id, list, index) on the board's label, and are told the lists and the range when an argument is wrong; agentMoves={false} hides it for a host with its own confirmed action.

Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.