Skip to content

Planning

Screens for planning work and time: a Kanban board and a week calendar.

Installation & usage

npx @youj/cli add app-task-board

Also 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:

taskBoard-view.tsx
'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
      }}
    />
  )
}

Reference

Props17 props, 2 types

Props

TaskBoard props
PropType
embeddedboolean

A page in your app's frame: the shared page header (AppPage) and the frame's gutter, across the whole width.

default true

true
titlestring

The page's heading.

default 'My tasks'

'My tasks'
headingLevel1 | 2 | 3

The heading's level.

default 1

1
classNamesPartial<Record<'header' | 'content', string>>

Extra classes for the header and the board.

–
columnsKanbanColumn[]

The columns, left to right; a limit warns past it.

default Backlog, In progress (4), In review and Done

Backlog, In progress (4), In review and Done
tasksBoardTask[]

The cards, each placed by its column. A new array replaces them.

default Northwind's fifteen

Northwind's fifteen
labelTonesRecord<string, BoardTone>

Tints for your own labels, by label: a task's own labelTone still wins. Default: every label in one quiet neutral pill.

–
sprintBoardSprint | null

The 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> | unknown

A card moved; receives the move and every task after it. Return a promise to put the card back if it rejects.

–
onOpen(task: BoardTask) => void

Enter, or a click, on a card.

–
onCreate() => void

The New task button.

–
actionsReactNode

The header's buttons, in place of New task.

–
loadingboolean

Shows skeleton columns in place of the board.

default false

false
errorReactNode

A load error, shown in place of the board with onRetry.

–
onRetry() => void

The error's "Try again".

–
emptyReactNode

Replaces the board when there are no tasks at all. Default: the board's empty columns.

–
copyPartial<BoardCopy>

Any of the page's strings, to rewrite or translate.

–

BoardSprint

BoardSprint props
PropType
nameRequiredstring–
datesRequiredstring

"28 Sep – 9 Oct"

–
goalstring–
daysLeftnumber–

BoardTask

BoardTask props
PropType
keystring

The issue key, "ATL-142".

–
projectstring–
labelstring

The kind of work, as a tinted badge.

–
labelToneBoardTone
'danger''default''secondary''warning''success'

The label's tint. Default: every label in one quiet neutral pill.

–
assigneestring–
priorityBoardPriority
'urgent''high''medium''low'
–
duestring

"Today", "Tomorrow" or a date.

–
pointsnumber

Its 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.

–
commentsnumber

How many comments it has.

–
peoplestring[]

Others working on it, beside the assignee.

–
idRequiredstring–
columnRequiredstring–
lanestring–
titleRequiredstring

Used 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.

subtitlenewTaskurgenthighmediumlowdueassignedtodaydoneColumnpointssubtaskscommentswithpointsDonedaysLeftteamerrorTitleretryfailed
Built from10 components
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.