npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-board.json --yesBoard
ProA board of items in columns by status, for a tracker, a roadmap or a pipeline, for React and Tailwind CSS. Part of Goop Pro.
What an agent sees
- BoardCardOne card
- BoardColumnHeaderA column's header
- BoardColumnOne column of cards under its header
- moveBoardItemThe items after a move, for a board you hold in state
import { moveBoardItem, BoardCard, BoardColumnHeader, BoardColumn, Board } from '@/components/ui/goop/board';
import { useState } from 'react';
import { useRecordPeek, RecordPeek, RecordPeekList, RecordPeekPanel, RecordPeekHeader } from '@/components/goop/patterns/record-peek';
function Work() {
const [items, setItems] = useState<Parameters<typeof Board>[0]["items"]>([
{
id: "w-7",
column: "started",
title: "Speaker labels swap after an edit",
description: "Transcript search",
chips: [
{ label: "High priority", priority: "high", iconOnly: true },
{ label: "Friday", icon: "calendar" },
],
owner: { name: "Yuto Sakamaki" },
},
{ id: "w-1", column: "done", title: "Consent forms on phones", owner: { name: "Bilal Rashed" } },
]);
const peek = useRecordPeek();
const open = items.find((item) => item.id === peek.id);
return (
<RecordPeek
open={open !== undefined}
onOpenChange={(next) => {
if (!next) peek.close();
}}
records={items.map((item) => item.id)}
value={peek.id}
onValueChange={peek.step}
href={open ? `/work/${open.id}` : undefined}
>
<RecordPeekList>
<Board
aria-label="Work by status"
columns={[
{ id: "planned", title: "Planned", status: "todo" },
{ id: "started", title: "In progress", status: "in-progress" },
{ id: "paused", title: "Paused", status: { name: "Paused", icon: "circle-dashed" } },
{ id: "done", title: "Done", status: "done", summary: "3 points" },
]}
items={items}
onMove={(id, column, index) => setItems((now) => moveBoardItem(now, id, column, index))}
selected={peek.id}
onItemSelect={(item) => peek.open(item.id)}
onAdd={(column) => send(column.id)}
/>
</RecordPeekList>
<RecordPeekPanel>
<RecordPeekHeader title={open?.title ?? ""} />
</RecordPeekPanel>
</RecordPeek>
);
}Drag a card to another column or place (on a phone, hold it still a moment first), or focus it and press Space, the arrows and Space again; press a card to open it; press + on a column to add an item there. Switch on title links, each card's Move to menu (move a card without dragging), progress lines or two-line second lines. The items are our own sample; nothing is saved anywhere.
When to use
- A board of items in columns by status, for a tracker, a roadmap or a pipeline.
- Use it for items grouped by a status that a person moves forward (issues, deals, applicants, roadmap items), never a grid of cards by hand: it brings the moves, the keyboard and the phone's one column at a time. A week of a schedule by room or person is the WeekBoard; the same items as rows, a ListGroup per status. On a page, after the divided PageHeader:
gutter="page",h-full, never a paddeddiv. No owner yet:owner: 'unassigned'. Open a card's record beside it with the record peek (selected). - Also called: kanban board.
Installation
Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Board on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/trail-board.json --yesAdd the Goop Board to this project. The install steps are at https://goop.so/docs/install.mdUsage
import { moveBoardItem, BoardCard, BoardColumnHeader, BoardColumn, Board } from '@/components/ui/goop/board';
import { useState } from 'react';
import { useRecordPeek, RecordPeek, RecordPeekList, RecordPeekPanel, RecordPeekHeader } from '@/components/goop/patterns/record-peek';
function Work() {
const [items, setItems] = useState<Parameters<typeof Board>[0]["items"]>([
{
id: "w-7",
column: "started",
title: "Speaker labels swap after an edit",
description: "Transcript search",
chips: [
{ label: "High priority", priority: "high", iconOnly: true },
{ label: "Friday", icon: "calendar" },
],
owner: { name: "Yuto Sakamaki" },
},
{ id: "w-1", column: "done", title: "Consent forms on phones", owner: { name: "Bilal Rashed" } },
]);
const peek = useRecordPeek();
const open = items.find((item) => item.id === peek.id);
return (
<RecordPeek
open={open !== undefined}
onOpenChange={(next) => {
if (!next) peek.close();
}}
records={items.map((item) => item.id)}
value={peek.id}
onValueChange={peek.step}
href={open ? `/work/${open.id}` : undefined}
>
<RecordPeekList>
<Board
aria-label="Work by status"
columns={[
{ id: "planned", title: "Planned", status: "todo" },
{ id: "started", title: "In progress", status: "in-progress" },
{ id: "paused", title: "Paused", status: { name: "Paused", icon: "circle-dashed" } },
{ id: "done", title: "Done", status: "done", summary: "3 points" },
]}
items={items}
onMove={(id, column, index) => setItems((now) => moveBoardItem(now, id, column, index))}
selected={peek.id}
onItemSelect={(item) => peek.open(item.id)}
onAdd={(column) => send(column.id)}
/>
</RecordPeekList>
<RecordPeekPanel>
<RecordPeekHeader title={open?.title ?? ""} />
</RecordPeekPanel>
</RecordPeek>
);
}- Fits: board (its recipe); board, list: collection.
- Also known as: Kanban, KanbanBoard, TaskBoard, StatusBoard, Pipeline.
- height, width, padding, gap, corner, border, background, shadow, text, motion: add no class for these.
API reference
- Each option with its sentence: board--options.md
| Part | What it is |
|---|---|
| BoardCard | One card |
| BoardColumnHeader | A column's header |
| BoardColumn | One column of cards under its header |
| moveBoardItem | The items after a move, for a board you hold in state |
BoardCard
One card.
import { BoardCard } from '@/components/ui/goop/board';Options
- title: string — Its name: two lines at most, then an ellipsis.
- description?: string | undefined — A second line; cut on one line, named whole while cut.
- descriptionLines?: 1 | 2 | undefined = 1 —
2: the second line runs to two lines before its ellipsis. - chips?: readonly BoardChip[] | undefined — Its chips, in order.
- owner?: BoardOwner | 'unassigned' | undefined — Its owner's avatar, at the title line's end;
'unassigned': the dashed person. - unassignedLabel?: string | undefined = 'Unassigned' — The unassigned mark's words.
- progress?: number | undefined — How far it has gone, 0 to 100: a thin progress line at its foot, its value read in its description.
- progressLabel?: string | undefined — The progress read whole (
3 of 5 sub-issues done);40% donewhen left out. - href?: string | undefined — The title as a link to the item's record.
- link?: ReactElement | undefined — The title on your router's own link instead (
link={<Link to="/work/w-15" />}, no children of its own): merged with the title's look, its words the title's. - actions?: ReactNode — Controls at the card's end, on its chips' line (a menu button, the board's "Move to").
- selected?: boolean = false — The card open beside the board (a record peek, a detail pane): the accent ring and
aria-current. - lifted?: boolean = false — Picked up for a move: lifted with the accent ring.
- Also takes: type?: 'button' | 'submit' | 'reset'; onClick?: (event: MouseEvent) => void; disabled?: boolean
- Types: BoardChip = { label: string; status?: StatusKind | StatusCustom; priority?: PriorityLevel; icon?: IconName; variant?: StatusVariant; iconOnly?: boolean }; BoardOwner = { name: string; image?: string }
BoardColumnHeader
A column's header.
import { BoardColumnHeader } from '@/components/ui/goop/board';Options
- title: string — The column's name, a heading (
h3). - status?: 'backlog' | 'todo' | 'in-progress' | 'in-review' | 'done' | 'cancelled' | StatusCustom | undefined — Its status: the status's StatusMark before the name, in place of
iconandvariant. - icon?: IconName — A mark for a column that is no status, a pack icon by name.
- variant?: StatusVariant | undefined — The icon's colour, by what it means (
info,success,warning,destructive); the muted grey (default) left out. - count?: number | undefined — How many items the column holds; the number alone is shown.
- countLabel?: (count: number) => string — The count read whole (
3 items). - summary?: string | undefined — What the column is worth, after the count (
€18,420); cut before the action where the header is narrow. - summaryId?: string | undefined — The summary's id, for the column's name.
- action?: ReactNode — The controls at the header's end (an add button).
- titleId?: string | undefined — The heading's id, for the column's name.
- Types: StatusCustom = { name: string; icon: IconName; variant?: StatusVariant | 'primary' }
BoardColumn
One column of cards under its header.
import { BoardColumn } from '@/components/ui/goop/board';Options
- title: string — The column's name.
- status?: 'backlog' | 'todo' | 'in-progress' | 'in-review' | 'done' | 'cancelled' | StatusCustom | undefined — Its status: the status's StatusMark before the name, in place of
iconandvariant. - icon?: IconName — A mark for a column that is no status, a pack icon by name.
- variant?: StatusVariant | undefined — The icon's colour, by what it means (
info,success,warning,destructive); the muted grey (default) left out. - count?: number | undefined — Its count; the number of cards when left out.
- countLabel?: ((count: number) => string) | undefined — The count read whole (
3 items). - summary?: string | undefined — What the column is worth, after its count (
€18,420): read with its name. - action?: ReactNode — The header's action (an add button).
- empty?: ReactNode = 'No items' — The words of a column with no card.
- Types: StatusCustom = { name: string; icon: IconName; variant?: StatusVariant | 'primary' }
Board: every option
import { Board } from '@/components/ui/goop/board';Options
- aria-label: string — The board's name (
Issues by status). - columns: readonly BoardColumnData[] — The columns, in order.
- items: readonly BoardItem[] — The items; each sits in the column its
columnnames, in the order listed. - onMove?: (id: string, toColumn: string, index: number) => void — Given, cards move by drag and by the keys; called with the item's id, its new column and its index there among the column's other items.
- onItemSelect?: (item: BoardItem) => void — Called with an item when its card is pressed (the pointer, Enter).
- selected?: string | null = null — The id of the item open beside the board: its card shows selected.
- onAdd?: (column: BoardColumnData) => void — Given, each column's header offers an add button that calls it.
- addLabel?: (column: BoardColumnData) => string — The add button's name.
- empty?: ReactNode = 'No items' — The words of a column with no card.
- countLabel?: (count: number) => string — A column's count read whole (
3 items); the number alone is shown. - messages?: Partial<BoardMessages> — The words said while a card moves.
- moveMenu?: boolean = false — With
onMove, each card ends in a "Move to" menu of the other columns: a pick moves the card to that column's end as a keyboard move does (onMove, said aloud), the focus kept on the card. - itemLink?: (item: BoardItem) => ReactElement | undefined — An item's title on your router's own link (
(item) => <Link to={/issues/${item.id}} />, no children of its own), in place of itshref;undefinedfor an item with none. - itemActions?: (item: BoardItem) => ReactNode — Your controls at a card's end, on its chips' line (before the "Move to" menu).
- unassignedLabel?: string = 'Unassigned' — The unassigned mark's words.
- gutter?: 'none' | 'page' = 'none' —
pageon a page: the row scrolls to the panel's edges, its end columns on the 24 px gutter, with the page's top edge over them. - Types: BoardColumnData = { id: string; title: string; status?: StatusKind | StatusCustom; icon?: IconName; variant?: StatusVariant; summary?: string }
Keyboard
| Key | What it does |
|---|---|
| Tab | Move column by column: each column's add button (the theme's icon button), then its cards in order |
| ArrowUp ArrowDown | At rest, move to the card above or below in the column; with a card picked up, move it one position up or down |
| ArrowLeft ArrowRight | At rest, move to the card at the same position in the column before or after; with a card picked up, move it into that column |
| Home End | Move to the column's first or last card |
| Space | Pick the focused card up; pressed again, drop it where it stands |
| Enter | Open the card; with a card picked up, drop it |
| Escape | Cancel a move: the card goes back where it was |
Accessibility
- The native element answers the keyboard.
- hover, active, focus-visible: the browser's own (:hover, :active, :focus-visible): write nothing
Its states are drawn from attributes and props, so assistive technology and your agent read the same thing:
| State | Drawn by |
|---|---|
| selected | the attribute data-selected |
Motion
- The part sets its own motion: add no transition or animation of your own.
- How the theme moves, and how to move your own parts the same way: Motion.
Notes for AI
Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.