Kanban

A board whose columns wrap to any width. Cards carry tags, priority, a due date and people. Pick one up and it lifts and tilts, a slot opens where it will land and the rest slide apart. Work-in-progress limits, inline add and keyboard moves are built in. Data.

Open playground

To do2

Docs

Write the migration guide

Cover the renamed props and the new motion tokens.

Fri
A11y

Audit colour contrast

Dec 12

In progress1 / 2

Motion

Tune the springs

Calmer settle on the dialog and the sheet.

Today

Done1

Release

Ship v0.1

About

Kanban is a React component in the Data category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { Kanban } from "@ashutoshswamy/smoui" and set columns, card, onChange among its 4 props.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { Kanban } from "@ashutoshswamy/smoui";

<Kanban
  addable
  columns={[
    { id: "doing", title: "In progress", limit: 3, cards: [
      { id: "k1", title: "Tune the springs", description: "Calmer settle.", tags: ["Motion"], priority: "high", due: "Fri", assignees: ["Cal Rivers"] },
    ] },
    { id: "done", title: "Done", cards: [] },
  ]}
  onChange={(cols) => save(cols)}
/>

Props 4

columns

Board state (uncontrolled). limit is a work-in-progress cap: the count turns red past it.

{ id; title; limit?; cards: Card[] }[]
card

priority is low, medium or high (three signal bars). due is free text. tag and assignee still work for a single value.

{ id; title; description?; tags?; priority?; due?; assignees? }
onChange

Called after each move or add with the new board.

(columns) => void
addable

An Add card button at the foot of each column.

booleandefault false