Components · Tasks
TaskBoard
The board view of tasks — one column per status, in status order, with cards that can be dragged to another column to change their status.
import { TaskBoard } from "@botiverse/raft-ui";A TaskBoard shows tasks in one column per status, from Backlog to Closed. Dragging a card to another column changes its status. It is one of the two views of a page of tasks; the other, and the default, is the page's list. When to show which is in Tasks.
Not yet implemented in raft-ui: this example shows the board before 0042, with five columns and no completion control on the cards.
When to use
Anatomy
TaskBoardRoot: the row of columns. Required.TaskBoardColumn: one status. A collapsible section. Required, one per status.TaskBoardColumnTrigger: the column heading, which collapses the column.TaskBoardColumnHeading:TaskBoardColumnBadge(the status pixel and name) andTaskBoardColumnCount.TaskBoardColumnChevron: the arrow that shows whether the column is open, right while it is collapsed and down while it is open. Always shown, inforeground-hintat rest: a collapsed column shows only its heading, and with no arrow "Closed 2" over an empty space reads as two tasks that failed to load (Kirby, 2026-11-10, #wg-task-v2:8a7ae237). It drawsChevronDownwhen given no children.
TaskBoardColumnPanelandTaskBoardColumnItems: the cards.TaskBoardColumnEmpty: what an empty column says, with three texts:TaskBoardColumnEmptyIdlenormally,TaskBoardColumnEmptyAllowedwhile a card can be dropped there,TaskBoardColumnEmptyBlockedwhile it can't.
Drag and drop comes from the TaskDnd parts (TaskDndProvider, TaskDropZone, TaskDraggable), which the board composition wires in.
States
Behavior
- Order the columns Backlog, Todo, In progress, Done, Closed, and start only Closed collapsed (Tasks).
- Don't refuse a drop because of the status a card has or would get: any status can be set from any status (Tasks). A column refuses a card only for a reason outside the statuses, such as a task the person may not change.
- Switch between the list and the board with List / Board near the end of the page's toolbar (Tasks), and remember the person's choice.
- Scroll the whole board in one viewport, both ways. Columns keep their width and never scroll on their own.
- Mount only the visible cards of a tall column with a virtualizer of your own that reads the board's scroll position, as below.
Content
- Write the empty text the same way as an empty group in a list (TaskList).
- While a card is dragged over an empty column, name the status it would get, or, when the column refuses it, why ("You can't change this task's status").
Accessibility
- Each column is a Base UI
Collapsiblerendered as asection; its trigger is a button witharia-expanded. - Give each column an accessible name: the status name in the trigger, or
aria-labelon the section. - Cards can be moved with the keyboard: Space picks a card up, Left and Right move it between columns (Up and Down move it within a column only where the column is in the person's own order), Space drops it and Escape puts it back. Enter opens the card (Drag and drop).
- Announce each step by name: "Picked up Task #25. Over Todo." "Dropped Task #25 in In progress." Pass the card's and the status's names to
TaskDndProvider'sdescribe; the board composition shows how. The board doesn't announce on its own, and withoutdescribenothing is announced.
Rules
- Count the cards in every column heading, in Space Mono.
API
TaskBoardColumn
Also takes the attributes of its element.
TaskBoardColumnBadge
Also takes the attributes of its element.
TaskBoardColumnChevron, TaskBoardColumnCount, TaskBoardColumnEmpty, TaskBoardColumnEmptyAllowed, TaskBoardColumnEmptyBlocked, TaskBoardColumnEmptyIdle, TaskBoardColumnHeading, TaskBoardColumnItems
Also takes the attributes of its element.
TaskBoardColumnPanel
Also takes the attributes of its element.
TaskBoardColumnTrigger
Also takes the attributes of its element.
TaskBoardRoot
Also takes the attributes of its element.
Related
Changes
- 0.84.0 · FixedTaskBoard:
TaskBoardColumnChevrondraws aChevronDownwhen given no children, so a column heading always shows whether the column is open. slock passed it empty, so no column had the arrow and a collapsed Closed column read as "Closed 2" over nothing.