Skip to content
Calm motion: animations on this site only fade, with no movement

Kanban ​

Columns of cards, drag between columns, WIP limits

A board whose cards move between columns: tasks, applicants, orders. For one list that only reorders, use Sortable. For two lists with transfer buttons, PickList.

Basic

To do

3
  • Write the changelog
  • Check RTL on the drawer
  • Update screenshots

Doing

1 / 2
  • Review the Tour page

Done

1
  • Publish 0.1.0
drag a grip, or focus it, press Space, then the arrow keys; "Doing" holds two cards
  • v-model is the whole board: [{ id, title, items, limit? }]. Moves produce a new array, so it works with ref, a store or immutable updates.
  • Drag a card by its grip, with mouse, touch or pen. A line shows where it will land. The move happens on release, in the same column or another.
  • A column with a limit refuses drops once it holds that many cards, and its count turns red. Cards can still be reordered inside it.
  • Keyboard: focus a grip. Space grabs. ↑ ↓ move the card within its column. ← → move it to the next column (mirrored under RTL). Space drops, and Esc puts everything back. Each step is announced.
  • #card="{ item, column, index }" draws a card, #header="{ column }" replaces the column title. move gives (item, from, to) with { column, index } on each side.
  • Holding a card near the board's left or right edge scrolls the board. Near the top or bottom of the window scrolls the page (useAutoScroll is exported if you build your own drag surface).
  • Pass rowKey when cards have an id so they keep their state as they move.

Usage ​

ts
import { BlessKanban } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
rowKey((item: T) => string | number)—
labelstring—
labelsPartial<{ card: (index: number, column: string) => string; moved: (column: string, position: number, total: number) => string; position: (column: string, position: number, total: number) => string; dropped: (column: string, position: number) => string; full: (column: string) => string; grabbed: string; cancelled: string; hint: string; roleDescription: string; }>—screen-reader wording; each message that carries names or numbers is a function of them
modelValueBlessKanbanColumn<T>[][]

Events

NamePayloadDescription
move[item: T, from: { column: string; index: number; }, to: { column: string; index: number; }]
update:modelValue[value: BlessKanbanColumn<T>[]]

Slots

NameScopeDescription
header{ column: BlessKanbanColumn<T>; }
card{ item: T; column: BlessKanbanColumn<T>; index: number; }

Released under the MIT License. Character names and artwork belong to their owners.