Planning
Screens for planning work and time: a Kanban board and a week calendar.
Installation & usage
npx @youj/cli add app-task-boardAlso installs alert, app-page, avatar, avatar-stack, badge, button, icon-calendar, icon-list-checks, icon-message, icon-plus, kanban, segmented-meter, share-bar, skeleton, youj-ui-core.
The CLI copies the block to blocks/app/task-board.tsx with every component it uses, so it’s yours to edit.
Every prop is optional and falls back to the demo, so it renders as you see it until you pass your own. Give it your data, rewrite or translate its strings through copy, and connect its actions:
'use client'
import { TaskBoard, type TaskBoardProps } from '@/blocks/app/task-board'
export function TaskBoardView({ columns, tasks, labelTones }: Pick<TaskBoardProps, 'columns' | 'tasks' | 'labelTones'>) {
return (
<TaskBoard
columns={columns}
tasks={tasks}
labelTones={labelTones}
copy={{ newTask: 'New task' }}
onMove={async (move, tasks) => {
// await your API here; the block shows progress until it settles
}}
onOpen={(task) => {
// your code
}}
onCreate={() => {
// your code
}}
/>
)
}Description
Help a team track tasks through their stages with a Kanban board and a sprint summary above it.
Help a team track tasks through their stages with a Kanban board and a sprint summary above it.
Plan a week on a time grid, with what is up next today and a Slot Grid to find a free hour.
Plan a week on a time grid, with what is up next today and a Slot Grid to find a free hour.
Code
Task Board, the Board story: the files youj add writes.
blocks/app
Reference
Props17 props, 2 types
Props
| Prop | Type | |
|---|---|---|
embedded | booleanA page in your app's frame: the shared page header (AppPage) and the frame's gutter, across the whole width. default true | true |
title | stringThe page's heading. default 'My tasks' | 'My tasks' |
headingLevel | 1 | 2 | 3The heading's level. default 1 | 1 |
classNames | Partial<Record<'header' | 'content', string>>Extra classes for the header and the board. | – |
columns | KanbanColumn[]The columns, left to right; a default Backlog, In progress (4), In review and Done | Backlog, In progress (4), In review and Done |
tasks | BoardTask[]The cards, each placed by its default Northwind's fifteen | Northwind's fifteen |
labelTones | Record<string, BoardTone>Tints for your own labels, by label: a task's own | – |
sprint | BoardSprint | nullThe sprint over the board; null leaves it out. default Northwind's Sprint 14 | Northwind's Sprint 14 |
onMove | (move: KanbanMove<BoardTask>, tasks: BoardTask[]) => Promise<unknown> | unknownA card moved; receives the move and every task after it. Return a promise to put the card back if it rejects. | – |
onOpen | (task: BoardTask) => voidEnter, or a click, on a card. | – |
onCreate | () => voidThe New task button. | – |
actions | ReactNodeThe header's buttons, in place of New task. | – |
loading | booleanShows skeleton columns in place of the board. default false | false |
error | ReactNodeA load error, shown in place of the board with | – |
onRetry | () => voidThe error's "Try again". | – |
empty | ReactNodeReplaces the board when there are no tasks at all. Default: the board's empty columns. | – |
copy | Partial<BoardCopy>Any of the page's strings, to rewrite or translate. | – |
BoardSprint
| Prop | Type | |
|---|---|---|
nameRequired | string | – |
datesRequired | string"28 Sep – 9 Oct" | – |
goal | string | – |
daysLeft | number | – |
BoardTask
| Prop | Type | |
|---|---|---|
key | stringThe issue key, "ATL-142". | – |
project | string | – |
label | stringThe kind of work, as a tinted badge. | – |
labelTone | BoardTone'danger''default''secondary''warning''success'The label's tint. Default: every label in one quiet neutral pill. | – |
assignee | string | – |
priority | BoardPriority'urgent''high''medium''low' | – |
due | string"Today", "Tomorrow" or a date. | – |
points | numberIts estimate, in points: a chip on the card, and the sprint's progress counts them. | – |
subtasks | { done: number; total: number }Its checklist: a bar of cells and "3/5" on the card. | – |
comments | numberHow many comments it has. | – |
people | string[]Others working on it, beside the assignee. | – |
idRequired | string | – |
columnRequired | string | – |
lane | string | – |
titleRequired | stringUsed in announcements ("Picked up 'Fix login'…"). | – |
Strings20 keys for copy
Strings
copy takes any of these keys; the rest keep their defaults. A key whose text holds a value (a count, a name) takes a function.
subtitlenewTaskurgenthighmediumlowdueassignedtodaydoneColumnpointssubtaskscommentswithpointsDonedaysLeftteamerrorTitleretryfailedBuilt from10 components
Built from
Accessibilitylandmarks, keyboard, live regions
Accessibility
Board has a header and one heading. Cards can be moved without a pointer: arrow keys walk the cards, Space picks one up, the arrows carry it and Space drops it, and each step is announced. Calendar’s week is a labelled group whose events open in a popover, with aria-busy while it loads and a live region for week changes. Links and buttons are real a and button elements with the kit’s focus ring.