Skip to content
Klarhimmel UI

App, kanban board

App, kanban board previewApp, kanban board preview

Install

npx shadcn add @klarhimmel/app-boards-kanban
DetailsAbout, usage, props and more

A board of columns with cards (title, assignee, due date, status flag).

Import

Import

import Block from '@/components/klarhimmel/blocks/app-boards-kanban';
Also called
  • app/boards-kanban
About
A board of columns with cards (title, assignee, due date, status flag). Every card has a Move menu that lists the other columns, so a card moves by keyboard; the move is announced and focus follows the card. Empty columns say so.
Category
Interface sections for signed-in products. New project? Set it up once: /get-started/installation.

Notes

When to use it

A board of columns holding cards, such as tasks by status. For a plain list of rows use app-data-table; for a single discussion use app-comments-thread.

Writing for it

- Use 2 to 5 columns, each titled in 30 characters or less and holding at most 8 cards. A column title is rendered as a heading, so name it by stage, like In review. - moveLabel and moveTo (30) name the button that moves a card by keyboard; write them as the verb, such as Move, and the menu lists the other columns. - moved (30) is the announcement after a move, with the card and column added, so keep it to a short phrase.

Watch out for

Moves are kept only inside the block until its own data changes, so a reload loses them unless the host stores the result. In the error state the retry puts the board into loading, not back to filled, and only the host can bring it back.

Usage

The block in a page, with its default content (long lists shortened). Every prop is in the table below.

section.tsx
import { Theme } from '@/components/klarhimmel/theme/style';
import { BlockSurface } from '@/components/klarhimmel/blocks/surface';
import AppBoardsKanban from '@/components/klarhimmel/blocks/app-boards-kanban';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <AppBoardsKanban props={{
          "eyebrow": "Name the section",
          "title": "Name the board",
          "description": "Say in one line what the work on this board is for.",
          "columns": [
            {
              "title": "To do",
              "cards": [
                {
                  "title": "Say what the first task is about",
                  "assignee": "Assignee",
                  "due": "Mon 00 Jan",
                  "status": "Blocked",
                  "overdue": true
                }
              ]
            }
          ],
          "countOne": "card",
          "countLabel": "cards",
          "emptyColumn": "Say the column is empty.",
          "moveLabel": "Move",
          "moveTo": "Move to",
          "moved": "moved to",
          "overdueLabel": "Overdue",
          "state": "filled",
          "messages": {
            "empty": "Say the board is empty and how to add the first card.",
            "loading": "Say the board is loading…",
            "error": "Say the board did not load.",
            "retry": "Try again"
          }
        }} />
      </BlockSurface>
    </Theme>
  );
}

Props

The type, default and text limit of every prop. On a real page, over-limit text is kept and checkSections flags it (Installation, Check a page before you ship); this live preview shows the default until it fits. The panel above edits all props.

PropTypeDefaultDescription
eyebrowstring'Name the section'Text, up to 60 characters. Optional; empty is not rendered.
titlestring'Name the board'Text, up to 120 characters.
descriptionstring'Say in one line what the work on th…'Text, up to 300 characters. Optional; empty is not rendered.
columns{ title, cards }[]3 itemsList of 2 to 5. Each item: title, cards.
countOnestring'card'Text, up to 20 characters.
countLabelstring'cards'Text, up to 20 characters.
emptyColumnstring'Say the column is empty.'Text, up to 80 characters.
moveLabelstring'Move'Text, up to 20 characters.
moveTostring'Move to'Text, up to 30 characters.
movedstring'moved to'Text, up to 30 characters.
overdueLabelstring'Overdue'Text, up to 20 characters.
state'filled' | 'empty' | 'loading' | 'error''filled'One of 'filled', 'empty', 'loading', 'error'.
messages{ empty, loading, error, retry }{…}Fields: empty, loading, error, retry.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.