Create

General

Kanban

Copy page View as Markdown Open in ChatGPT Open in Claude

A board of columns with cards that are dragged within a column, between columns, and columns that are reordered.

Usage#

app.component.ts
import { WDS_KANBAN } from '@wds/angular/kanban';

Put wds-kanban-column elements in wds-kanban, each with a header and a wds-kanban-column-content holding wds-kanban-item cards. Bind value (column keys mapped to lists of cards) and set it again from wds-change, which fires live while dragging; card identifiers come from getItemValue (by default id). In plain HTML leave value unset: the board then moves the elements itself and wds-change carries the identifiers. Ready-made boards (issue tracking) are in Kanban Board blocks.

Examples#

Default#

Cards move within and between columns as you drag, and wds-kanban-column-handle in the header reorders the columns (it shows on hover or keyboard focus). A copy of the card or column follows the pointer while the original keeps its place at half opacity.

Backlog 3
Audit color tokenshigh
LPLena Park
Draft onboarding emailsmedium
TRTomás Ruiz
Sort out icon sizeslow
PNPriya Nair
In progress 2
Migrate the billing pagehigh
JWJonas Weber
Add keyboard shortcutsmedium
ASAiko Sato
Done 2
Set up preview deploysmedium
MNMarta Nowak
Rename settings sectionslow
OBOwen Blake

Placeholder overlay#

overlay="placeholder" drags a dashed box of the card’s size instead of its copy.

Backlog 3
Audit color tokenshigh
LPLena Park
Draft onboarding emailsmedium
TRTomás Ruiz
Sort out icon sizeslow
PNPriya Nair
In progress 2
Migrate the billing pagehigh
JWJonas Weber
Add keyboard shortcutsmedium
ASAiko Sato
Done 2
Set up preview deploysmedium
MNMarta Nowak
Rename settings sectionslow
OBOwen Blake

Frame columns#

Each column is a wds-frame with a status icon and a count, and each card a wds-frame-panel. Without a column handle only the cards move.

To do3
Write the migration guideDocs
Fix the flaky upload testQA
Compress hero imagesPerformance
In progress2
Refactor auth middlewareBackend
Build the pricing tableFrontend
Done1
Kick-off with the clientPlanning

Stacked frame#

A stacked frame with a description under each column title, over cards with a progress bar and the assignee.

Planning1
Scoped and waiting for a slot
Survey current users
LP Lena P. 15%
Building2
Being worked on this sprint
Design the new dashboard
AS Aiko S. 60%
Payments integration
JW Jonas W. 35%
Released1
Live for all users
Repository setup
MN Marta N. 100%

Feature roadmap#

Feature cards with a description, progress and votes across stages marked with a colored dot.

Planned2
Saved filters

Keep sets of filters and share them with the team

0% complete 128 votes
Audit log export

Download account activity as a CSV file

0% complete 87 votes
Building2
Offline mode

Keep working without a connection and sync later

55% complete 211 votes
Granular roles

Custom permissions for each workspace

30% complete 164 votes
Shipped2
Two-factor sign-in

One-time codes from an authenticator app

100% complete 402 votes
Bulk edit

Change many records at once

100% complete 175 votes

Collapsible columns#

collapsed folds a column into a narrow rail that hides its cards; here the header turns into a vertical title with the count. Cards can still be dropped on a rail and land at the end of its list. The empty slot of wds-kanban-column-content shows while a column has no cards (here Blocked), also when its last card is dragged out.

Backlog3
Audit color tokenshigh
Draft onboarding emailsmedium
Sort out icon sizeslow
No tasks
In progress2
Migrate the billing pagehigh
Add keyboard shortcutsmedium
No tasks
Blocked0
No tasks
In review1
Set up preview deploysmedium
No tasks
Done1
Rename settings sectionslow
No tasks

Persist to a backend#

wds-commit fires once per finished drag (never during the live preview) with the board after the move and previousValue before it. Here the save fails about once in four tries and the board goes back to previousValue. kind tells a card move (item) from a column reorder (column).

Backlog 3
Audit color tokenshigh
Draft onboarding emailsmedium
Sort out icon sizeslow
In progress 2
Migrate the billing pagehigh
Add keyboard shortcutsmedium
Done 2
Set up preview deploysmedium
Rename settings sectionslow

API References#

wds-kanban#

A board of columns with cards that are dragged within a column, between columns, and columns that are reordered. Each column is a wds-kanban-column with a wds-kanban-column-content holding wds-kanban-item cards; the content of cards and headers is up to you. With value set (a property: column keys mapped to lists of cards), the board does not move elements itself: it fires wds-change with the new board, live while dragging, and you render it again. Without value it moves the elements and wds-change carries the identifiers. wds-commit fires once per finished drag, with the board before the drag, so a move can be saved and rolled back. The board lays the columns out in one row of equal width (below 640px one under another); --wds-kanban-column-width gives them a fixed width instead. A column with collapsed shrinks to a narrow rail.

Attributes

AttributeTypeDefaultDescription
overlayWdsKanbanOverlay'clone'What follows the pointer while dragging: a copy of the card or column, or a dashed box of its size.
restore-on-cancel.restoreOnCancelbooleanfalseCancelling a drag (Escape) puts the board back the way it was before the drag. Without it the moves stay and are committed.

Properties

PropertyDescription
valueRecord<string, T[]> | undefinedThe board: column keys in display order, each mapped to its cards. With it set the board is controlled: update it from wds-change. Without it the board reads and moves the elements.
getItemValue(item: T) => stringReturns the unique identifier of a card (the value of its wds-kanban-item). Defaults to id, then value, then the card itself.

Events

EventDescription
wds-changeCustomEvent<WdsKanbanChangeDetail>The board changed: while dragging (live preview), on a cancel with restore-on-cancel.
wds-commitCustomEvent<WdsKanbanCommitDetail>Once per finished drag that changed the board; carries the board before the drag.
wds-drag-startCustomEvent<WdsKanbanDragDetail>A drag started.
wds-drag-endCustomEvent<WdsKanbanDragDetail>A drag ended with a drop.
wds-drag-cancelCustomEvent<WdsKanbanDragDetail>A drag was cancelled (Escape).

Slots

SlotDescription
(default)wds-kanban-column elements.

CSS custom properties

PropertyDescription
--wds-kanban-gapSpace between columns (default 16px).
--wds-kanban-column-widthFixed width of the columns (by default they share the width equally).
--wds-kanban-column-collapsed-widthWidth of a collapsed column (default 48px).

wds-kanban-column#

A column of wds-kanban: a header (often with a wds-kanban-column-handle) and a wds-kanban-column-content with the cards. A card can be dropped anywhere over the column, also below the last card. With collapsed the column becomes a narrow rail and hides its cards; a card dropped on it goes to the end of the list. What the rail shows (e.g. a vertical title and a count) is up to the header content.

Attributes

AttributeTypeDefaultDescription
valuestring''Unique identifier of the column: a key of the board's value.
labelstring''Name of the column read by screen readers while dragging (defaults to value).
collapsedbooleanfalseThe column is folded into a narrow rail that hides its cards. Cards can still be dropped on it.
disabledbooleanfalseThe column cannot be dragged. Cards can still be dropped into it.

Slots

SlotDescription
(default)Header and wds-kanban-column-content.

wds-kanban-column-handle#

The handle that drags a wds-kanban-column to a new place. It shows a grip icon, stays hidden until the column is hovered or the handle has keyboard focus, and is a button: Space or Enter picks the column up. Keep the column title outside the handle.

Attributes

AttributeTypeDefaultDescription
labelstring''Accessible name (defaults to „Move column” with the column's name).

Slots

SlotDescription
(default)Icon instead of the grip.

wds-kanban-column-content#

The list of cards in a wds-kanban-column, stacked with an 8px gap. Without a script setting the board's value, the board moves dragged cards into this element. Content in the empty slot shows while the list has no cards, also when the last card is dragged out.

Slots

SlotDescription
(default)wds-kanban-item elements.
emptyShown when the column has no cards, e.g. „No tasks”. The element has the empty attribute while it has no cards.

wds-kanban-item#

A card of a wds-kanban-column. Without a wds-kanban-item-handle inside, the whole card is the handle: it is a button in the tab order, dragged with the pointer or picked up with Space or Enter.

Attributes

AttributeTypeDefaultDescription
valuestring''Unique identifier of the card across all columns: what the board's getItemValue returns for it.
labelstring''Name of the card read by screen readers while dragging (defaults to value).
disabledbooleanfalseThe card cannot be dragged.

Slots

SlotDescription
(default)Content of the card.

wds-kanban-item-handle#

The part of a wds-kanban-item that drags it. With a handle inside, only the handle starts a drag and takes keyboard focus; the rest of the card can hold links and buttons. The handle can wrap the whole card or be an icon.

Slots

SlotDescription
(default)Content of the handle.

Accessibility#

Screen reader#

Each card (or its wds-kanban-item-handle) and each column handle is a button in the tab order, with aria-description explaining the keys. A picked-up element has aria-pressed="true".

Picking up, each move and the drop are announced in a live region with the position and the column, e.g. „Migrate the billing page moved to position 1 of 3 in Backlog”. Give cards and columns a label so the announcements use their names instead of their identifiers.

The column handle is named „Move column” with the column’s name; label on the handle overrides it. The copy that follows the pointer is aria-hidden.

Keyboard support#

KeyFunction
SpacePicks up the focused card or column; while dragging, drops it.
EnterPicks up the focused card or column; while dragging, drops it.
ArrowUpWhile dragging a card, moves it one place up in its column; a column moves one place back.
ArrowDownWhile dragging a card, moves it one place down in its column; a column moves one place forward.
ArrowLeftWhile dragging, moves the card to the previous expanded column (at the same position) or the column one place back.
ArrowRightWhile dragging, moves the card to the next expanded column (at the same position) or the column one place forward.
EscapeCancels the drag; with restore-on-cancel the board goes back to how it was before.
Footer