General
Kanban
Usage#
import { WDS_KANBAN } from '@wds/angular/kanban';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#
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.
import { Component, computed, signal } from '@angular/core';
import { WdsAvatarComponent } from '@wds/angular/avatar';
import { WdsBadgeComponent } from '@wds/angular/badge';
import { WdsCardComponent } from '@wds/angular/card';
import {
WdsKanbanColumnComponent,
WdsKanbanColumnContentComponent,
WdsKanbanColumnHandleComponent,
WdsKanbanComponent,
WdsKanbanItemComponent,
} from '@wds/angular/kanban';
import { initials, PRIORITY_CLASS, TASK_COLUMNS, TASKS } from './kanban-data';
@Component({
selector: 'app-kanban-default-demo',
host: { class: 'block w-full' },
imports: [
WdsAvatarComponent,
WdsBadgeComponent,
WdsCardComponent,
WdsKanbanComponent,
WdsKanbanColumnComponent,
WdsKanbanColumnContentComponent,
WdsKanbanColumnHandleComponent,
WdsKanbanItemComponent,
],
template: `
<wds-kanban [value]="columns()" (wdsChange)="columns.set($event.value)">
@for (column of entries(); track column[0]) {
<wds-kanban-column [value]="column[0]" [label]="titles[column[0]]">
<wds-card size="sm" class="h-full">
<span slot="title" class="flex items-center gap-2.5">
{{ titles[column[0]] }}
<wds-badge variant="outline">{{ column[1].length }}</wds-badge>
</span>
<wds-kanban-column-handle slot="action" />
<wds-kanban-column-content class="gap-2.5">
@for (task of column[1]; track task.id) {
<wds-kanban-item [value]="task.id" [label]="task.title">
<wds-card size="sm" class="[--wds-card-padding:12px]">
<div class="flex flex-col gap-2.5">
<div class="flex items-center justify-between gap-2">
<span class="line-clamp-2 text-sm font-medium">{{ task.title }}</span>
<wds-badge class="shrink-0 capitalize" [class]="priority[task.priority]">{{ task.priority }}</wds-badge>
</div>
<div class="flex items-center justify-between gap-2 text-xs text-muted-foreground">
<span class="flex items-center gap-1.5">
<wds-avatar class="[--wds-avatar-font-size:8px] [--wds-avatar-size:16px]">{{ initials(task.assignee) }}</wds-avatar>
<span class="line-clamp-1">{{ task.assignee }}</span>
</span>
<time class="whitespace-nowrap text-[10px] tabular-nums">{{ task.due }}</time>
</div>
</div>
</wds-card>
</wds-kanban-item>
}
</wds-kanban-column-content>
</wds-card>
</wds-kanban-column>
}
</wds-kanban>
`,
})
export class KanbanDefaultDemo {
protected readonly titles = TASK_COLUMNS;
protected readonly priority = PRIORITY_CLASS;
protected readonly initials = initials;
protected readonly columns = signal(TASKS);
protected readonly entries = computed(() => Object.entries(this.columns()));
}export type Priority = 'low' | 'medium' | 'high';
export interface Task {
id: string;
title: string;
priority: Priority;
assignee: string;
due: string;
}
/** Column titles by key. */
export const TASK_COLUMNS: Record<string, string> = {
backlog: 'Backlog',
active: 'In progress',
done: 'Done',
};
export const TASKS: Record<string, Task[]> = {
backlog: [
{ id: 't1', title: 'Audit color tokens', priority: 'high', assignee: 'Lena Park', due: 'Mar 4, 2026' },
{ id: 't2', title: 'Draft onboarding emails', priority: 'medium', assignee: 'Tomás Ruiz', due: 'Mar 7, 2026' },
{ id: 't3', title: 'Sort out icon sizes', priority: 'low', assignee: 'Priya Nair', due: 'Mar 12, 2026' },
],
active: [
{ id: 't4', title: 'Migrate the billing page', priority: 'high', assignee: 'Jonas Weber', due: 'Mar 3, 2026' },
{ id: 't5', title: 'Add keyboard shortcuts', priority: 'medium', assignee: 'Aiko Sato', due: 'Mar 6, 2026' },
],
done: [
{ id: 't6', title: 'Set up preview deploys', priority: 'medium', assignee: 'Marta Nowak', due: 'Feb 26, 2026' },
{ id: 't7', title: 'Rename settings sections', priority: 'low', assignee: 'Owen Blake', due: 'Feb 24, 2026' },
],
};
/** Badge colors of the priorities. */
export const PRIORITY_CLASS: Record<Priority, string> = {
high: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-destructive)_12%,transparent)] [--wds-badge-fg:var(--wds-destructive)] [--wds-badge-border:transparent]',
medium: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-chart-3)_12%,transparent)] [--wds-badge-fg:var(--wds-chart-3)] [--wds-badge-border:transparent]',
low: '[--wds-badge-bg:color-mix(in_oklch,oklch(0.666_0.179_58.318)_14%,transparent)] [--wds-badge-fg:oklch(0.555_0.163_48.998)] [--wds-badge-border:transparent]',
};
/** Workflow with an empty column; `done` starts collapsed. */
export const WORKFLOW_COLUMNS: Record<string, string> = {
backlog: 'Backlog',
active: 'In progress',
blocked: 'Blocked',
review: 'In review',
done: 'Done',
};
export const WORKFLOW: Record<string, Task[]> = {
backlog: TASKS.backlog,
active: TASKS.active,
blocked: [],
review: [TASKS.done[0]],
done: [TASKS.done[1]],
};
export interface LabeledTask {
id: string;
title: string;
label: string;
}
export const STATUS_COLUMNS: Record<string, string> = {
todo: 'To do',
doing: 'In progress',
done: 'Done',
};
export const LABELED_TASKS: Record<string, LabeledTask[]> = {
todo: [
{ id: 'l1', title: 'Write the migration guide', label: 'Docs' },
{ id: 'l2', title: 'Fix the flaky upload test', label: 'QA' },
{ id: 'l3', title: 'Compress hero images', label: 'Performance' },
],
doing: [
{ id: 'l4', title: 'Refactor auth middleware', label: 'Backend' },
{ id: 'l5', title: 'Build the pricing table', label: 'Frontend' },
],
done: [{ id: 'l6', title: 'Kick-off with the client', label: 'Planning' }],
};
/** Badge colors of the labels. */
export const LABEL_CLASS: Record<string, string> = {
Docs: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-chart-2)_12%,transparent)] [--wds-badge-fg:var(--wds-chart-2)] [--wds-badge-border:transparent]',
QA: '[--wds-badge-bg:color-mix(in_oklch,oklch(0.596_0.145_163.225)_14%,transparent)] [--wds-badge-fg:oklch(0.508_0.118_165.612)] [--wds-badge-border:transparent]',
Performance: '[--wds-badge-bg:color-mix(in_oklch,oklch(0.666_0.179_58.318)_14%,transparent)] [--wds-badge-fg:oklch(0.555_0.163_48.998)] [--wds-badge-border:transparent]',
Backend: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-chart-4)_12%,transparent)] [--wds-badge-fg:var(--wds-chart-4)] [--wds-badge-border:transparent]',
Frontend: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-destructive)_12%,transparent)] [--wds-badge-fg:var(--wds-destructive)] [--wds-badge-border:transparent]',
Planning: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-chart-2)_12%,transparent)] [--wds-badge-fg:var(--wds-chart-2)] [--wds-badge-border:transparent]',
};
export interface ProgressTask {
id: string;
title: string;
assignee: string;
progress: number;
}
export const STAGES: Record<string, { title: string; description: string }> = {
planning: { title: 'Planning', description: 'Scoped and waiting for a slot' },
building: { title: 'Building', description: 'Being worked on this sprint' },
released: { title: 'Released', description: 'Live for all users' },
};
export const PROGRESS_TASKS: Record<string, ProgressTask[]> = {
planning: [{ id: 'p1', title: 'Survey current users', assignee: 'Lena P.', progress: 15 }],
building: [
{ id: 'p2', title: 'Design the new dashboard', assignee: 'Aiko S.', progress: 60 },
{ id: 'p3', title: 'Payments integration', assignee: 'Jonas W.', progress: 35 },
],
released: [{ id: 'p4', title: 'Repository setup', assignee: 'Marta N.', progress: 100 }],
};
export interface Feature {
id: string;
title: string;
description: string;
progress: number;
votes: number;
}
export const ROADMAP_COLUMNS: Record<string, { title: string; color: string }> = {
planned: { title: 'Planned', color: 'bg-blue-500' },
building: { title: 'Building', color: 'bg-amber-500' },
shipped: { title: 'Shipped', color: 'bg-emerald-500' },
};
export const FEATURES: Record<string, Feature[]> = {
planned: [
{ id: 'f1', title: 'Saved filters', description: 'Keep sets of filters and share them with the team', progress: 0, votes: 128 },
{ id: 'f2', title: 'Audit log export', description: 'Download account activity as a CSV file', progress: 0, votes: 87 },
],
building: [
{ id: 'f3', title: 'Offline mode', description: 'Keep working without a connection and sync later', progress: 55, votes: 211 },
{ id: 'f4', title: 'Granular roles', description: 'Custom permissions for each workspace', progress: 30, votes: 164 },
],
shipped: [
{ id: 'f5', title: 'Two-factor sign-in', description: 'One-time codes from an authenticator app', progress: 100, votes: 402 },
{ id: 'f6', title: 'Bulk edit', description: 'Change many records at once', progress: 100, votes: 175 },
],
};
/** Initials of a name for the avatar. */
export function initials(name: string): string {
return name
.split(' ')
.map((part) => part[0])
.join('')
.slice(0, 2)
.toUpperCase();
}
/** A pretend API call: answers after 700 ms and fails about once in four calls. */
export function saveBoard(): Promise<void> {
return new Promise((resolve, reject) => {
setTimeout(() => (Math.random() < 0.25 ? reject(new Error('Network error')) : resolve()), 700);
});
}Placeholder overlay#
overlay="placeholder" drags a dashed box of the card’s size instead of its copy.
import { Component, computed, signal } from '@angular/core';
import { WdsAvatarComponent } from '@wds/angular/avatar';
import { WdsBadgeComponent } from '@wds/angular/badge';
import { WdsCardComponent } from '@wds/angular/card';
import {
WdsKanbanColumnComponent,
WdsKanbanColumnContentComponent,
WdsKanbanColumnHandleComponent,
WdsKanbanComponent,
WdsKanbanItemComponent,
} from '@wds/angular/kanban';
import { initials, PRIORITY_CLASS, TASK_COLUMNS, TASKS } from './kanban-data';
@Component({
selector: 'app-kanban-placeholder-demo',
host: { class: 'block w-full' },
imports: [
WdsAvatarComponent,
WdsBadgeComponent,
WdsCardComponent,
WdsKanbanComponent,
WdsKanbanColumnComponent,
WdsKanbanColumnContentComponent,
WdsKanbanColumnHandleComponent,
WdsKanbanItemComponent,
],
template: `
<wds-kanban overlay="placeholder" [value]="columns()" (wdsChange)="columns.set($event.value)">
@for (column of entries(); track column[0]) {
<wds-kanban-column [value]="column[0]" [label]="titles[column[0]]">
<wds-card size="sm" class="h-full">
<span slot="title" class="flex items-center gap-2.5">
{{ titles[column[0]] }}
<wds-badge variant="outline">{{ column[1].length }}</wds-badge>
</span>
<wds-kanban-column-handle slot="action" />
<wds-kanban-column-content class="gap-2.5">
@for (task of column[1]; track task.id) {
<wds-kanban-item [value]="task.id" [label]="task.title">
<wds-card size="sm" class="[--wds-card-padding:12px]">
<div class="flex flex-col gap-2.5">
<div class="flex items-center justify-between gap-2">
<span class="line-clamp-2 text-sm font-medium">{{ task.title }}</span>
<wds-badge class="shrink-0 capitalize" [class]="priority[task.priority]">{{ task.priority }}</wds-badge>
</div>
<div class="flex items-center justify-between gap-2 text-xs text-muted-foreground">
<span class="flex items-center gap-1.5">
<wds-avatar class="[--wds-avatar-font-size:8px] [--wds-avatar-size:16px]">{{ initials(task.assignee) }}</wds-avatar>
<span class="line-clamp-1">{{ task.assignee }}</span>
</span>
<time class="whitespace-nowrap text-[10px] tabular-nums">{{ task.due }}</time>
</div>
</div>
</wds-card>
</wds-kanban-item>
}
</wds-kanban-column-content>
</wds-card>
</wds-kanban-column>
}
</wds-kanban>
`,
})
export class KanbanPlaceholderDemo {
protected readonly titles = TASK_COLUMNS;
protected readonly priority = PRIORITY_CLASS;
protected readonly initials = initials;
protected readonly columns = signal(TASKS);
protected readonly entries = computed(() => Object.entries(this.columns()));
}export type Priority = 'low' | 'medium' | 'high';
export interface Task {
id: string;
title: string;
priority: Priority;
assignee: string;
due: string;
}
/** Column titles by key. */
export const TASK_COLUMNS: Record<string, string> = {
backlog: 'Backlog',
active: 'In progress',
done: 'Done',
};
export const TASKS: Record<string, Task[]> = {
backlog: [
{ id: 't1', title: 'Audit color tokens', priority: 'high', assignee: 'Lena Park', due: 'Mar 4, 2026' },
{ id: 't2', title: 'Draft onboarding emails', priority: 'medium', assignee: 'Tomás Ruiz', due: 'Mar 7, 2026' },
{ id: 't3', title: 'Sort out icon sizes', priority: 'low', assignee: 'Priya Nair', due: 'Mar 12, 2026' },
],
active: [
{ id: 't4', title: 'Migrate the billing page', priority: 'high', assignee: 'Jonas Weber', due: 'Mar 3, 2026' },
{ id: 't5', title: 'Add keyboard shortcuts', priority: 'medium', assignee: 'Aiko Sato', due: 'Mar 6, 2026' },
],
done: [
{ id: 't6', title: 'Set up preview deploys', priority: 'medium', assignee: 'Marta Nowak', due: 'Feb 26, 2026' },
{ id: 't7', title: 'Rename settings sections', priority: 'low', assignee: 'Owen Blake', due: 'Feb 24, 2026' },
],
};
/** Badge colors of the priorities. */
export const PRIORITY_CLASS: Record<Priority, string> = {
high: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-destructive)_12%,transparent)] [--wds-badge-fg:var(--wds-destructive)] [--wds-badge-border:transparent]',
medium: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-chart-3)_12%,transparent)] [--wds-badge-fg:var(--wds-chart-3)] [--wds-badge-border:transparent]',
low: '[--wds-badge-bg:color-mix(in_oklch,oklch(0.666_0.179_58.318)_14%,transparent)] [--wds-badge-fg:oklch(0.555_0.163_48.998)] [--wds-badge-border:transparent]',
};
/** Workflow with an empty column; `done` starts collapsed. */
export const WORKFLOW_COLUMNS: Record<string, string> = {
backlog: 'Backlog',
active: 'In progress',
blocked: 'Blocked',
review: 'In review',
done: 'Done',
};
export const WORKFLOW: Record<string, Task[]> = {
backlog: TASKS.backlog,
active: TASKS.active,
blocked: [],
review: [TASKS.done[0]],
done: [TASKS.done[1]],
};
export interface LabeledTask {
id: string;
title: string;
label: string;
}
export const STATUS_COLUMNS: Record<string, string> = {
todo: 'To do',
doing: 'In progress',
done: 'Done',
};
export const LABELED_TASKS: Record<string, LabeledTask[]> = {
todo: [
{ id: 'l1', title: 'Write the migration guide', label: 'Docs' },
{ id: 'l2', title: 'Fix the flaky upload test', label: 'QA' },
{ id: 'l3', title: 'Compress hero images', label: 'Performance' },
],
doing: [
{ id: 'l4', title: 'Refactor auth middleware', label: 'Backend' },
{ id: 'l5', title: 'Build the pricing table', label: 'Frontend' },
],
done: [{ id: 'l6', title: 'Kick-off with the client', label: 'Planning' }],
};
/** Badge colors of the labels. */
export const LABEL_CLASS: Record<string, string> = {
Docs: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-chart-2)_12%,transparent)] [--wds-badge-fg:var(--wds-chart-2)] [--wds-badge-border:transparent]',
QA: '[--wds-badge-bg:color-mix(in_oklch,oklch(0.596_0.145_163.225)_14%,transparent)] [--wds-badge-fg:oklch(0.508_0.118_165.612)] [--wds-badge-border:transparent]',
Performance: '[--wds-badge-bg:color-mix(in_oklch,oklch(0.666_0.179_58.318)_14%,transparent)] [--wds-badge-fg:oklch(0.555_0.163_48.998)] [--wds-badge-border:transparent]',
Backend: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-chart-4)_12%,transparent)] [--wds-badge-fg:var(--wds-chart-4)] [--wds-badge-border:transparent]',
Frontend: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-destructive)_12%,transparent)] [--wds-badge-fg:var(--wds-destructive)] [--wds-badge-border:transparent]',
Planning: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-chart-2)_12%,transparent)] [--wds-badge-fg:var(--wds-chart-2)] [--wds-badge-border:transparent]',
};
export interface ProgressTask {
id: string;
title: string;
assignee: string;
progress: number;
}
export const STAGES: Record<string, { title: string; description: string }> = {
planning: { title: 'Planning', description: 'Scoped and waiting for a slot' },
building: { title: 'Building', description: 'Being worked on this sprint' },
released: { title: 'Released', description: 'Live for all users' },
};
export const PROGRESS_TASKS: Record<string, ProgressTask[]> = {
planning: [{ id: 'p1', title: 'Survey current users', assignee: 'Lena P.', progress: 15 }],
building: [
{ id: 'p2', title: 'Design the new dashboard', assignee: 'Aiko S.', progress: 60 },
{ id: 'p3', title: 'Payments integration', assignee: 'Jonas W.', progress: 35 },
],
released: [{ id: 'p4', title: 'Repository setup', assignee: 'Marta N.', progress: 100 }],
};
export interface Feature {
id: string;
title: string;
description: string;
progress: number;
votes: number;
}
export const ROADMAP_COLUMNS: Record<string, { title: string; color: string }> = {
planned: { title: 'Planned', color: 'bg-blue-500' },
building: { title: 'Building', color: 'bg-amber-500' },
shipped: { title: 'Shipped', color: 'bg-emerald-500' },
};
export const FEATURES: Record<string, Feature[]> = {
planned: [
{ id: 'f1', title: 'Saved filters', description: 'Keep sets of filters and share them with the team', progress: 0, votes: 128 },
{ id: 'f2', title: 'Audit log export', description: 'Download account activity as a CSV file', progress: 0, votes: 87 },
],
building: [
{ id: 'f3', title: 'Offline mode', description: 'Keep working without a connection and sync later', progress: 55, votes: 211 },
{ id: 'f4', title: 'Granular roles', description: 'Custom permissions for each workspace', progress: 30, votes: 164 },
],
shipped: [
{ id: 'f5', title: 'Two-factor sign-in', description: 'One-time codes from an authenticator app', progress: 100, votes: 402 },
{ id: 'f6', title: 'Bulk edit', description: 'Change many records at once', progress: 100, votes: 175 },
],
};
/** Initials of a name for the avatar. */
export function initials(name: string): string {
return name
.split(' ')
.map((part) => part[0])
.join('')
.slice(0, 2)
.toUpperCase();
}
/** A pretend API call: answers after 700 ms and fails about once in four calls. */
export function saveBoard(): Promise<void> {
return new Promise((resolve, reject) => {
setTimeout(() => (Math.random() < 0.25 ? reject(new Error('Network error')) : resolve()), 700);
});
}Frame columns#
wds-frame with a status icon and a count, and each card a wds-frame-panel. Without a column handle only the cards move.
import { Component, computed, signal } from '@angular/core';
import { WdsBadgeComponent } from '@wds/angular/badge';
import { WdsFrameComponent, WdsFrameHeaderComponent, WdsFramePanelComponent, WdsFrameTitleComponent } from '@wds/angular/frame';
import { WdsKanbanColumnComponent, WdsKanbanColumnContentComponent, WdsKanbanComponent, WdsKanbanItemComponent } from '@wds/angular/kanban';
import { LABEL_CLASS, LABELED_TASKS, STATUS_COLUMNS } from './kanban-data';
import { WdsIconComponent } from '@wds/angular/icon';
import '@wds/core/icons/lucide/circle';
import '@wds/core/icons/lucide/circle-check';
import '@wds/core/icons/lucide/circle-dot';
@Component({
selector: 'app-kanban-frame-columns-demo',
host: { class: 'block w-full' },
imports: [
WdsIconComponent,
WdsBadgeComponent,
WdsFrameComponent,
WdsFrameHeaderComponent,
WdsFramePanelComponent,
WdsFrameTitleComponent,
WdsKanbanComponent,
WdsKanbanColumnComponent,
WdsKanbanColumnContentComponent,
WdsKanbanItemComponent,
],
template: `
<wds-kanban overlay="placeholder" [value]="columns()" (wdsChange)="columns.set($event.value)">
@for (column of entries(); track column[0]) {
<wds-kanban-column [value]="column[0]" [label]="titles[column[0]] ?? column[0]">
<wds-frame spacing="sm" class="h-full">
<wds-frame-header class="flex-row items-center gap-2">
@switch (column[0]) {
@case ('doing') {
<wds-icon name="lucide-circle-dot" class="size-4 text-muted-foreground"></wds-icon>
}
@case ('done') {
<wds-icon name="lucide-circle-check" class="size-4 text-muted-foreground"></wds-icon>
}
@default {
<wds-icon name="lucide-circle" class="size-4 text-muted-foreground"></wds-icon>
}
}
<wds-frame-title>{{ titles[column[0]] ?? column[0] }}</wds-frame-title>
<wds-badge variant="outline" class="ml-auto">{{ column[1].length }}</wds-badge>
</wds-frame-header>
<wds-kanban-column-content class="p-0.5">
@for (task of column[1]; track task.id) {
<wds-kanban-item [value]="task.id" [label]="task.title">
<wds-frame-panel class="[--wds-frame-panel-padding:12px]">
<div class="flex flex-col items-start gap-2">
<span class="text-sm font-medium">{{ task.title }}</span>
<wds-badge [class]="labels[task.label]">{{ task.label }}</wds-badge>
</div>
</wds-frame-panel>
</wds-kanban-item>
}
</wds-kanban-column-content>
</wds-frame>
</wds-kanban-column>
}
</wds-kanban>
`,
})
export class KanbanFrameColumnsDemo {
protected readonly titles = STATUS_COLUMNS;
protected readonly labels = LABEL_CLASS;
protected readonly columns = signal(LABELED_TASKS);
protected readonly entries = computed(() => Object.entries(this.columns()));
}export type Priority = 'low' | 'medium' | 'high';
export interface Task {
id: string;
title: string;
priority: Priority;
assignee: string;
due: string;
}
/** Column titles by key. */
export const TASK_COLUMNS: Record<string, string> = {
backlog: 'Backlog',
active: 'In progress',
done: 'Done',
};
export const TASKS: Record<string, Task[]> = {
backlog: [
{ id: 't1', title: 'Audit color tokens', priority: 'high', assignee: 'Lena Park', due: 'Mar 4, 2026' },
{ id: 't2', title: 'Draft onboarding emails', priority: 'medium', assignee: 'Tomás Ruiz', due: 'Mar 7, 2026' },
{ id: 't3', title: 'Sort out icon sizes', priority: 'low', assignee: 'Priya Nair', due: 'Mar 12, 2026' },
],
active: [
{ id: 't4', title: 'Migrate the billing page', priority: 'high', assignee: 'Jonas Weber', due: 'Mar 3, 2026' },
{ id: 't5', title: 'Add keyboard shortcuts', priority: 'medium', assignee: 'Aiko Sato', due: 'Mar 6, 2026' },
],
done: [
{ id: 't6', title: 'Set up preview deploys', priority: 'medium', assignee: 'Marta Nowak', due: 'Feb 26, 2026' },
{ id: 't7', title: 'Rename settings sections', priority: 'low', assignee: 'Owen Blake', due: 'Feb 24, 2026' },
],
};
/** Badge colors of the priorities. */
export const PRIORITY_CLASS: Record<Priority, string> = {
high: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-destructive)_12%,transparent)] [--wds-badge-fg:var(--wds-destructive)] [--wds-badge-border:transparent]',
medium: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-chart-3)_12%,transparent)] [--wds-badge-fg:var(--wds-chart-3)] [--wds-badge-border:transparent]',
low: '[--wds-badge-bg:color-mix(in_oklch,oklch(0.666_0.179_58.318)_14%,transparent)] [--wds-badge-fg:oklch(0.555_0.163_48.998)] [--wds-badge-border:transparent]',
};
/** Workflow with an empty column; `done` starts collapsed. */
export const WORKFLOW_COLUMNS: Record<string, string> = {
backlog: 'Backlog',
active: 'In progress',
blocked: 'Blocked',
review: 'In review',
done: 'Done',
};
export const WORKFLOW: Record<string, Task[]> = {
backlog: TASKS.backlog,
active: TASKS.active,
blocked: [],
review: [TASKS.done[0]],
done: [TASKS.done[1]],
};
export interface LabeledTask {
id: string;
title: string;
label: string;
}
export const STATUS_COLUMNS: Record<string, string> = {
todo: 'To do',
doing: 'In progress',
done: 'Done',
};
export const LABELED_TASKS: Record<string, LabeledTask[]> = {
todo: [
{ id: 'l1', title: 'Write the migration guide', label: 'Docs' },
{ id: 'l2', title: 'Fix the flaky upload test', label: 'QA' },
{ id: 'l3', title: 'Compress hero images', label: 'Performance' },
],
doing: [
{ id: 'l4', title: 'Refactor auth middleware', label: 'Backend' },
{ id: 'l5', title: 'Build the pricing table', label: 'Frontend' },
],
done: [{ id: 'l6', title: 'Kick-off with the client', label: 'Planning' }],
};
/** Badge colors of the labels. */
export const LABEL_CLASS: Record<string, string> = {
Docs: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-chart-2)_12%,transparent)] [--wds-badge-fg:var(--wds-chart-2)] [--wds-badge-border:transparent]',
QA: '[--wds-badge-bg:color-mix(in_oklch,oklch(0.596_0.145_163.225)_14%,transparent)] [--wds-badge-fg:oklch(0.508_0.118_165.612)] [--wds-badge-border:transparent]',
Performance: '[--wds-badge-bg:color-mix(in_oklch,oklch(0.666_0.179_58.318)_14%,transparent)] [--wds-badge-fg:oklch(0.555_0.163_48.998)] [--wds-badge-border:transparent]',
Backend: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-chart-4)_12%,transparent)] [--wds-badge-fg:var(--wds-chart-4)] [--wds-badge-border:transparent]',
Frontend: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-destructive)_12%,transparent)] [--wds-badge-fg:var(--wds-destructive)] [--wds-badge-border:transparent]',
Planning: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-chart-2)_12%,transparent)] [--wds-badge-fg:var(--wds-chart-2)] [--wds-badge-border:transparent]',
};
export interface ProgressTask {
id: string;
title: string;
assignee: string;
progress: number;
}
export const STAGES: Record<string, { title: string; description: string }> = {
planning: { title: 'Planning', description: 'Scoped and waiting for a slot' },
building: { title: 'Building', description: 'Being worked on this sprint' },
released: { title: 'Released', description: 'Live for all users' },
};
export const PROGRESS_TASKS: Record<string, ProgressTask[]> = {
planning: [{ id: 'p1', title: 'Survey current users', assignee: 'Lena P.', progress: 15 }],
building: [
{ id: 'p2', title: 'Design the new dashboard', assignee: 'Aiko S.', progress: 60 },
{ id: 'p3', title: 'Payments integration', assignee: 'Jonas W.', progress: 35 },
],
released: [{ id: 'p4', title: 'Repository setup', assignee: 'Marta N.', progress: 100 }],
};
export interface Feature {
id: string;
title: string;
description: string;
progress: number;
votes: number;
}
export const ROADMAP_COLUMNS: Record<string, { title: string; color: string }> = {
planned: { title: 'Planned', color: 'bg-blue-500' },
building: { title: 'Building', color: 'bg-amber-500' },
shipped: { title: 'Shipped', color: 'bg-emerald-500' },
};
export const FEATURES: Record<string, Feature[]> = {
planned: [
{ id: 'f1', title: 'Saved filters', description: 'Keep sets of filters and share them with the team', progress: 0, votes: 128 },
{ id: 'f2', title: 'Audit log export', description: 'Download account activity as a CSV file', progress: 0, votes: 87 },
],
building: [
{ id: 'f3', title: 'Offline mode', description: 'Keep working without a connection and sync later', progress: 55, votes: 211 },
{ id: 'f4', title: 'Granular roles', description: 'Custom permissions for each workspace', progress: 30, votes: 164 },
],
shipped: [
{ id: 'f5', title: 'Two-factor sign-in', description: 'One-time codes from an authenticator app', progress: 100, votes: 402 },
{ id: 'f6', title: 'Bulk edit', description: 'Change many records at once', progress: 100, votes: 175 },
],
};
/** Initials of a name for the avatar. */
export function initials(name: string): string {
return name
.split(' ')
.map((part) => part[0])
.join('')
.slice(0, 2)
.toUpperCase();
}
/** A pretend API call: answers after 700 ms and fails about once in four calls. */
export function saveBoard(): Promise<void> {
return new Promise((resolve, reject) => {
setTimeout(() => (Math.random() < 0.25 ? reject(new Error('Network error')) : resolve()), 700);
});
}Stacked frame#
stacked frame with a description under each column title, over cards with a progress bar and the assignee.
import { Component, computed, signal } from '@angular/core';
import { WdsAvatarComponent } from '@wds/angular/avatar';
import { WdsBadgeComponent } from '@wds/angular/badge';
import {
WdsFrameComponent,
WdsFrameDescriptionComponent,
WdsFrameHeaderComponent,
WdsFramePanelComponent,
WdsFrameTitleComponent,
} from '@wds/angular/frame';
import { WdsKanbanColumnComponent, WdsKanbanColumnContentComponent, WdsKanbanComponent, WdsKanbanItemComponent } from '@wds/angular/kanban';
import { WdsProgressComponent } from '@wds/angular/progress';
import { initials, PROGRESS_TASKS, STAGES } from './kanban-data';
@Component({
selector: 'app-kanban-stacked-frame-demo',
host: { class: 'block w-full' },
imports: [
WdsAvatarComponent,
WdsBadgeComponent,
WdsFrameComponent,
WdsFrameDescriptionComponent,
WdsFrameHeaderComponent,
WdsFramePanelComponent,
WdsFrameTitleComponent,
WdsKanbanComponent,
WdsKanbanColumnComponent,
WdsKanbanColumnContentComponent,
WdsKanbanItemComponent,
WdsProgressComponent,
],
template: `
<wds-kanban overlay="placeholder" [value]="columns()" (wdsChange)="columns.set($event.value)">
@for (column of entries(); track column[0]) {
<wds-kanban-column [value]="column[0]" [label]="stages[column[0]].title">
<wds-frame stacked spacing="sm" class="h-full">
<wds-frame-header>
<div class="flex items-center justify-between">
<wds-frame-title>{{ stages[column[0]].title }}</wds-frame-title>
<wds-badge variant="outline">{{ column[1].length }}</wds-badge>
</div>
<wds-frame-description>{{ stages[column[0]].description }}</wds-frame-description>
</wds-frame-header>
<wds-kanban-column-content class="p-0.5">
@for (task of column[1]; track task.id) {
<wds-kanban-item [value]="task.id" [label]="task.title">
<wds-frame-panel class="[--wds-frame-panel-padding:12px]">
<div class="flex flex-col gap-3">
<span class="text-sm font-medium">{{ task.title }}</span>
<wds-progress [value]="task.progress" label="Progress" />
<div class="flex items-center justify-between text-xs text-muted-foreground">
<span class="flex items-center gap-1.5">
<wds-avatar class="[--wds-avatar-font-size:9px] [--wds-avatar-size:20px]">{{ initials(task.assignee) }}</wds-avatar>
{{ task.assignee }}
</span>
<span class="tabular-nums">{{ task.progress }}%</span>
</div>
</div>
</wds-frame-panel>
</wds-kanban-item>
}
</wds-kanban-column-content>
</wds-frame>
</wds-kanban-column>
}
</wds-kanban>
`,
})
export class KanbanStackedFrameDemo {
protected readonly stages = STAGES;
protected readonly initials = initials;
protected readonly columns = signal(PROGRESS_TASKS);
protected readonly entries = computed(() => Object.entries(this.columns()));
}export type Priority = 'low' | 'medium' | 'high';
export interface Task {
id: string;
title: string;
priority: Priority;
assignee: string;
due: string;
}
/** Column titles by key. */
export const TASK_COLUMNS: Record<string, string> = {
backlog: 'Backlog',
active: 'In progress',
done: 'Done',
};
export const TASKS: Record<string, Task[]> = {
backlog: [
{ id: 't1', title: 'Audit color tokens', priority: 'high', assignee: 'Lena Park', due: 'Mar 4, 2026' },
{ id: 't2', title: 'Draft onboarding emails', priority: 'medium', assignee: 'Tomás Ruiz', due: 'Mar 7, 2026' },
{ id: 't3', title: 'Sort out icon sizes', priority: 'low', assignee: 'Priya Nair', due: 'Mar 12, 2026' },
],
active: [
{ id: 't4', title: 'Migrate the billing page', priority: 'high', assignee: 'Jonas Weber', due: 'Mar 3, 2026' },
{ id: 't5', title: 'Add keyboard shortcuts', priority: 'medium', assignee: 'Aiko Sato', due: 'Mar 6, 2026' },
],
done: [
{ id: 't6', title: 'Set up preview deploys', priority: 'medium', assignee: 'Marta Nowak', due: 'Feb 26, 2026' },
{ id: 't7', title: 'Rename settings sections', priority: 'low', assignee: 'Owen Blake', due: 'Feb 24, 2026' },
],
};
/** Badge colors of the priorities. */
export const PRIORITY_CLASS: Record<Priority, string> = {
high: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-destructive)_12%,transparent)] [--wds-badge-fg:var(--wds-destructive)] [--wds-badge-border:transparent]',
medium: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-chart-3)_12%,transparent)] [--wds-badge-fg:var(--wds-chart-3)] [--wds-badge-border:transparent]',
low: '[--wds-badge-bg:color-mix(in_oklch,oklch(0.666_0.179_58.318)_14%,transparent)] [--wds-badge-fg:oklch(0.555_0.163_48.998)] [--wds-badge-border:transparent]',
};
/** Workflow with an empty column; `done` starts collapsed. */
export const WORKFLOW_COLUMNS: Record<string, string> = {
backlog: 'Backlog',
active: 'In progress',
blocked: 'Blocked',
review: 'In review',
done: 'Done',
};
export const WORKFLOW: Record<string, Task[]> = {
backlog: TASKS.backlog,
active: TASKS.active,
blocked: [],
review: [TASKS.done[0]],
done: [TASKS.done[1]],
};
export interface LabeledTask {
id: string;
title: string;
label: string;
}
export const STATUS_COLUMNS: Record<string, string> = {
todo: 'To do',
doing: 'In progress',
done: 'Done',
};
export const LABELED_TASKS: Record<string, LabeledTask[]> = {
todo: [
{ id: 'l1', title: 'Write the migration guide', label: 'Docs' },
{ id: 'l2', title: 'Fix the flaky upload test', label: 'QA' },
{ id: 'l3', title: 'Compress hero images', label: 'Performance' },
],
doing: [
{ id: 'l4', title: 'Refactor auth middleware', label: 'Backend' },
{ id: 'l5', title: 'Build the pricing table', label: 'Frontend' },
],
done: [{ id: 'l6', title: 'Kick-off with the client', label: 'Planning' }],
};
/** Badge colors of the labels. */
export const LABEL_CLASS: Record<string, string> = {
Docs: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-chart-2)_12%,transparent)] [--wds-badge-fg:var(--wds-chart-2)] [--wds-badge-border:transparent]',
QA: '[--wds-badge-bg:color-mix(in_oklch,oklch(0.596_0.145_163.225)_14%,transparent)] [--wds-badge-fg:oklch(0.508_0.118_165.612)] [--wds-badge-border:transparent]',
Performance: '[--wds-badge-bg:color-mix(in_oklch,oklch(0.666_0.179_58.318)_14%,transparent)] [--wds-badge-fg:oklch(0.555_0.163_48.998)] [--wds-badge-border:transparent]',
Backend: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-chart-4)_12%,transparent)] [--wds-badge-fg:var(--wds-chart-4)] [--wds-badge-border:transparent]',
Frontend: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-destructive)_12%,transparent)] [--wds-badge-fg:var(--wds-destructive)] [--wds-badge-border:transparent]',
Planning: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-chart-2)_12%,transparent)] [--wds-badge-fg:var(--wds-chart-2)] [--wds-badge-border:transparent]',
};
export interface ProgressTask {
id: string;
title: string;
assignee: string;
progress: number;
}
export const STAGES: Record<string, { title: string; description: string }> = {
planning: { title: 'Planning', description: 'Scoped and waiting for a slot' },
building: { title: 'Building', description: 'Being worked on this sprint' },
released: { title: 'Released', description: 'Live for all users' },
};
export const PROGRESS_TASKS: Record<string, ProgressTask[]> = {
planning: [{ id: 'p1', title: 'Survey current users', assignee: 'Lena P.', progress: 15 }],
building: [
{ id: 'p2', title: 'Design the new dashboard', assignee: 'Aiko S.', progress: 60 },
{ id: 'p3', title: 'Payments integration', assignee: 'Jonas W.', progress: 35 },
],
released: [{ id: 'p4', title: 'Repository setup', assignee: 'Marta N.', progress: 100 }],
};
export interface Feature {
id: string;
title: string;
description: string;
progress: number;
votes: number;
}
export const ROADMAP_COLUMNS: Record<string, { title: string; color: string }> = {
planned: { title: 'Planned', color: 'bg-blue-500' },
building: { title: 'Building', color: 'bg-amber-500' },
shipped: { title: 'Shipped', color: 'bg-emerald-500' },
};
export const FEATURES: Record<string, Feature[]> = {
planned: [
{ id: 'f1', title: 'Saved filters', description: 'Keep sets of filters and share them with the team', progress: 0, votes: 128 },
{ id: 'f2', title: 'Audit log export', description: 'Download account activity as a CSV file', progress: 0, votes: 87 },
],
building: [
{ id: 'f3', title: 'Offline mode', description: 'Keep working without a connection and sync later', progress: 55, votes: 211 },
{ id: 'f4', title: 'Granular roles', description: 'Custom permissions for each workspace', progress: 30, votes: 164 },
],
shipped: [
{ id: 'f5', title: 'Two-factor sign-in', description: 'One-time codes from an authenticator app', progress: 100, votes: 402 },
{ id: 'f6', title: 'Bulk edit', description: 'Change many records at once', progress: 100, votes: 175 },
],
};
/** Initials of a name for the avatar. */
export function initials(name: string): string {
return name
.split(' ')
.map((part) => part[0])
.join('')
.slice(0, 2)
.toUpperCase();
}
/** A pretend API call: answers after 700 ms and fails about once in four calls. */
export function saveBoard(): Promise<void> {
return new Promise((resolve, reject) => {
setTimeout(() => (Math.random() < 0.25 ? reject(new Error('Network error')) : resolve()), 700);
});
}Feature roadmap#
Keep sets of filters and share them with the team
Download account activity as a CSV file
Keep working without a connection and sync later
Custom permissions for each workspace
One-time codes from an authenticator app
Change many records at once
import { Component, computed, signal } from '@angular/core';
import { WdsBadgeComponent } from '@wds/angular/badge';
import { WdsFrameComponent, WdsFrameHeaderComponent, WdsFramePanelComponent, WdsFrameTitleComponent } from '@wds/angular/frame';
import { WdsKanbanColumnComponent, WdsKanbanColumnContentComponent, WdsKanbanComponent, WdsKanbanItemComponent } from '@wds/angular/kanban';
import { WdsProgressComponent } from '@wds/angular/progress';
import { FEATURES, ROADMAP_COLUMNS } from './kanban-data';
import { WdsIconComponent } from '@wds/angular/icon';
import '@wds/core/icons/lucide/thumbs-up';
@Component({
selector: 'app-kanban-roadmap-demo',
host: { class: 'block w-full' },
imports: [
WdsIconComponent,
WdsBadgeComponent,
WdsFrameComponent,
WdsFrameHeaderComponent,
WdsFramePanelComponent,
WdsFrameTitleComponent,
WdsKanbanComponent,
WdsKanbanColumnComponent,
WdsKanbanColumnContentComponent,
WdsKanbanItemComponent,
WdsProgressComponent,
],
template: `
<wds-kanban overlay="placeholder" [value]="columns()" (wdsChange)="columns.set($event.value)">
@for (column of entries(); track column[0]) {
<wds-kanban-column [value]="column[0]" [label]="stages[column[0]].title">
<wds-frame spacing="sm" class="h-full">
<wds-frame-header class="flex-row items-center gap-2">
<span class="size-2 rounded-full" [class]="stages[column[0]].color"></span>
<wds-frame-title>{{ stages[column[0]].title }}</wds-frame-title>
<wds-badge variant="outline" class="ml-auto">{{ column[1].length }}</wds-badge>
</wds-frame-header>
<wds-kanban-column-content class="p-0.5">
@for (feature of column[1]; track feature.id) {
<wds-kanban-item [value]="feature.id" [label]="feature.title">
<wds-frame-panel class="[--wds-frame-panel-padding:12px]">
<div class="flex flex-col gap-2.5">
<span class="text-sm font-medium">{{ feature.title }}</span>
<p class="m-0 line-clamp-2 text-xs text-muted-foreground">{{ feature.description }}</p>
<wds-progress class="[--wds-progress-height:6px]" [value]="feature.progress" label="Progress" />
<div class="flex items-center justify-between text-muted-foreground">
<span class="text-[10px] tabular-nums">{{ feature.progress }}% complete</span>
<span class="flex items-center gap-1 text-xs tabular-nums">
<wds-icon name="lucide-thumbs-up" class="size-3"></wds-icon>
{{ feature.votes }}<span class="sr-only"> votes</span>
</span>
</div>
</div>
</wds-frame-panel>
</wds-kanban-item>
}
</wds-kanban-column-content>
</wds-frame>
</wds-kanban-column>
}
</wds-kanban>
`,
})
export class KanbanRoadmapDemo {
protected readonly stages = ROADMAP_COLUMNS;
protected readonly columns = signal(FEATURES);
protected readonly entries = computed(() => Object.entries(this.columns()));
}export type Priority = 'low' | 'medium' | 'high';
export interface Task {
id: string;
title: string;
priority: Priority;
assignee: string;
due: string;
}
/** Column titles by key. */
export const TASK_COLUMNS: Record<string, string> = {
backlog: 'Backlog',
active: 'In progress',
done: 'Done',
};
export const TASKS: Record<string, Task[]> = {
backlog: [
{ id: 't1', title: 'Audit color tokens', priority: 'high', assignee: 'Lena Park', due: 'Mar 4, 2026' },
{ id: 't2', title: 'Draft onboarding emails', priority: 'medium', assignee: 'Tomás Ruiz', due: 'Mar 7, 2026' },
{ id: 't3', title: 'Sort out icon sizes', priority: 'low', assignee: 'Priya Nair', due: 'Mar 12, 2026' },
],
active: [
{ id: 't4', title: 'Migrate the billing page', priority: 'high', assignee: 'Jonas Weber', due: 'Mar 3, 2026' },
{ id: 't5', title: 'Add keyboard shortcuts', priority: 'medium', assignee: 'Aiko Sato', due: 'Mar 6, 2026' },
],
done: [
{ id: 't6', title: 'Set up preview deploys', priority: 'medium', assignee: 'Marta Nowak', due: 'Feb 26, 2026' },
{ id: 't7', title: 'Rename settings sections', priority: 'low', assignee: 'Owen Blake', due: 'Feb 24, 2026' },
],
};
/** Badge colors of the priorities. */
export const PRIORITY_CLASS: Record<Priority, string> = {
high: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-destructive)_12%,transparent)] [--wds-badge-fg:var(--wds-destructive)] [--wds-badge-border:transparent]',
medium: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-chart-3)_12%,transparent)] [--wds-badge-fg:var(--wds-chart-3)] [--wds-badge-border:transparent]',
low: '[--wds-badge-bg:color-mix(in_oklch,oklch(0.666_0.179_58.318)_14%,transparent)] [--wds-badge-fg:oklch(0.555_0.163_48.998)] [--wds-badge-border:transparent]',
};
/** Workflow with an empty column; `done` starts collapsed. */
export const WORKFLOW_COLUMNS: Record<string, string> = {
backlog: 'Backlog',
active: 'In progress',
blocked: 'Blocked',
review: 'In review',
done: 'Done',
};
export const WORKFLOW: Record<string, Task[]> = {
backlog: TASKS.backlog,
active: TASKS.active,
blocked: [],
review: [TASKS.done[0]],
done: [TASKS.done[1]],
};
export interface LabeledTask {
id: string;
title: string;
label: string;
}
export const STATUS_COLUMNS: Record<string, string> = {
todo: 'To do',
doing: 'In progress',
done: 'Done',
};
export const LABELED_TASKS: Record<string, LabeledTask[]> = {
todo: [
{ id: 'l1', title: 'Write the migration guide', label: 'Docs' },
{ id: 'l2', title: 'Fix the flaky upload test', label: 'QA' },
{ id: 'l3', title: 'Compress hero images', label: 'Performance' },
],
doing: [
{ id: 'l4', title: 'Refactor auth middleware', label: 'Backend' },
{ id: 'l5', title: 'Build the pricing table', label: 'Frontend' },
],
done: [{ id: 'l6', title: 'Kick-off with the client', label: 'Planning' }],
};
/** Badge colors of the labels. */
export const LABEL_CLASS: Record<string, string> = {
Docs: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-chart-2)_12%,transparent)] [--wds-badge-fg:var(--wds-chart-2)] [--wds-badge-border:transparent]',
QA: '[--wds-badge-bg:color-mix(in_oklch,oklch(0.596_0.145_163.225)_14%,transparent)] [--wds-badge-fg:oklch(0.508_0.118_165.612)] [--wds-badge-border:transparent]',
Performance: '[--wds-badge-bg:color-mix(in_oklch,oklch(0.666_0.179_58.318)_14%,transparent)] [--wds-badge-fg:oklch(0.555_0.163_48.998)] [--wds-badge-border:transparent]',
Backend: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-chart-4)_12%,transparent)] [--wds-badge-fg:var(--wds-chart-4)] [--wds-badge-border:transparent]',
Frontend: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-destructive)_12%,transparent)] [--wds-badge-fg:var(--wds-destructive)] [--wds-badge-border:transparent]',
Planning: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-chart-2)_12%,transparent)] [--wds-badge-fg:var(--wds-chart-2)] [--wds-badge-border:transparent]',
};
export interface ProgressTask {
id: string;
title: string;
assignee: string;
progress: number;
}
export const STAGES: Record<string, { title: string; description: string }> = {
planning: { title: 'Planning', description: 'Scoped and waiting for a slot' },
building: { title: 'Building', description: 'Being worked on this sprint' },
released: { title: 'Released', description: 'Live for all users' },
};
export const PROGRESS_TASKS: Record<string, ProgressTask[]> = {
planning: [{ id: 'p1', title: 'Survey current users', assignee: 'Lena P.', progress: 15 }],
building: [
{ id: 'p2', title: 'Design the new dashboard', assignee: 'Aiko S.', progress: 60 },
{ id: 'p3', title: 'Payments integration', assignee: 'Jonas W.', progress: 35 },
],
released: [{ id: 'p4', title: 'Repository setup', assignee: 'Marta N.', progress: 100 }],
};
export interface Feature {
id: string;
title: string;
description: string;
progress: number;
votes: number;
}
export const ROADMAP_COLUMNS: Record<string, { title: string; color: string }> = {
planned: { title: 'Planned', color: 'bg-blue-500' },
building: { title: 'Building', color: 'bg-amber-500' },
shipped: { title: 'Shipped', color: 'bg-emerald-500' },
};
export const FEATURES: Record<string, Feature[]> = {
planned: [
{ id: 'f1', title: 'Saved filters', description: 'Keep sets of filters and share them with the team', progress: 0, votes: 128 },
{ id: 'f2', title: 'Audit log export', description: 'Download account activity as a CSV file', progress: 0, votes: 87 },
],
building: [
{ id: 'f3', title: 'Offline mode', description: 'Keep working without a connection and sync later', progress: 55, votes: 211 },
{ id: 'f4', title: 'Granular roles', description: 'Custom permissions for each workspace', progress: 30, votes: 164 },
],
shipped: [
{ id: 'f5', title: 'Two-factor sign-in', description: 'One-time codes from an authenticator app', progress: 100, votes: 402 },
{ id: 'f6', title: 'Bulk edit', description: 'Change many records at once', progress: 100, votes: 175 },
],
};
/** Initials of a name for the avatar. */
export function initials(name: string): string {
return name
.split(' ')
.map((part) => part[0])
.join('')
.slice(0, 2)
.toUpperCase();
}
/** A pretend API call: answers after 700 ms and fails about once in four calls. */
export function saveBoard(): Promise<void> {
return new Promise((resolve, reject) => {
setTimeout(() => (Math.random() < 0.25 ? reject(new Error('Network error')) : resolve()), 700);
});
}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.
import { Component, computed, signal } from '@angular/core';
import { WdsBadgeComponent } from '@wds/angular/badge';
import { WdsButtonComponent } from '@wds/angular/button';
import { WdsCardComponent } from '@wds/angular/card';
import {
WdsKanbanColumnComponent,
WdsKanbanColumnContentComponent,
WdsKanbanColumnHandleComponent,
WdsKanbanComponent,
WdsKanbanItemComponent,
} from '@wds/angular/kanban';
import { WdsScrollAreaComponent } from '@wds/angular/scroll-area';
import { PRIORITY_CLASS, WORKFLOW, WORKFLOW_COLUMNS } from './kanban-data';
import '@wds/core/icons/lucide/fold-horizontal';
import '@wds/core/icons/lucide/unfold-horizontal';
@Component({
selector: 'app-kanban-collapsible-demo',
host: { class: 'block w-full' },
imports: [
WdsBadgeComponent,
WdsButtonComponent,
WdsCardComponent,
WdsKanbanComponent,
WdsKanbanColumnComponent,
WdsKanbanColumnContentComponent,
WdsKanbanColumnHandleComponent,
WdsKanbanItemComponent,
WdsScrollAreaComponent,
],
template: `
<wds-scroll-area orientation="horizontal" class="w-full">
<wds-kanban class="w-max flex-row gap-3 pb-3 [--wds-kanban-column-width:14rem]" [value]="columns()" (wdsChange)="columns.set($event.value)">
@for (column of entries(); track column[0]) {
@let title = titles[column[0]];
@let folded = collapsed().has(column[0]);
<wds-kanban-column class="rounded-xl border border-border bg-muted/40 p-2" [value]="column[0]" [label]="title" [collapsed]="folded">
@if (folded) {
<!-- Rail: expand button, vertical title and the count. -->
<div class="flex flex-col items-center gap-2">
<wds-button variant="ghost" size="xs" [label]="'Expand ' + title" (click)="toggle(column[0])" icon="lucide-unfold-horizontal"></wds-button>
<span class="text-sm font-semibold [writing-mode:vertical-rl]">{{ title }}</span>
<wds-badge variant="outline">{{ column[1].length }}</wds-badge>
</div>
} @else {
<div class="flex items-center gap-2 px-1 pb-2">
<span class="text-sm font-semibold">{{ title }}</span>
<wds-badge variant="outline">{{ column[1].length }}</wds-badge>
<wds-kanban-column-handle class="ml-auto" />
<wds-button variant="ghost" size="xs" [label]="'Collapse ' + title" (click)="toggle(column[0])" icon="lucide-fold-horizontal"></wds-button>
</div>
}
<wds-kanban-column-content>
@for (task of column[1]; track task.id) {
<wds-kanban-item [value]="task.id" [label]="task.title">
<wds-card size="sm" class="[--wds-card-padding:12px]">
<div class="flex items-center justify-between gap-2">
<span class="line-clamp-2 text-sm font-medium">{{ task.title }}</span>
<wds-badge class="shrink-0 capitalize" [class]="priority[task.priority]">{{ task.priority }}</wds-badge>
</div>
</wds-card>
</wds-kanban-item>
}
<div slot="empty" class="rounded-lg border border-dashed border-border px-3 py-6 text-center text-sm text-muted-foreground">No tasks</div>
</wds-kanban-column-content>
</wds-kanban-column>
}
</wds-kanban>
</wds-scroll-area>
`,
})
export class KanbanCollapsibleDemo {
protected readonly titles = WORKFLOW_COLUMNS;
protected readonly priority = PRIORITY_CLASS;
protected readonly columns = signal(WORKFLOW);
protected readonly entries = computed(() => Object.entries(this.columns()));
protected readonly collapsed = signal(new Set(['done']));
protected toggle(key: string): void {
this.collapsed.update((set) => {
const next = new Set(set);
if (!next.delete(key)) next.add(key);
return next;
});
}
}export type Priority = 'low' | 'medium' | 'high';
export interface Task {
id: string;
title: string;
priority: Priority;
assignee: string;
due: string;
}
/** Column titles by key. */
export const TASK_COLUMNS: Record<string, string> = {
backlog: 'Backlog',
active: 'In progress',
done: 'Done',
};
export const TASKS: Record<string, Task[]> = {
backlog: [
{ id: 't1', title: 'Audit color tokens', priority: 'high', assignee: 'Lena Park', due: 'Mar 4, 2026' },
{ id: 't2', title: 'Draft onboarding emails', priority: 'medium', assignee: 'Tomás Ruiz', due: 'Mar 7, 2026' },
{ id: 't3', title: 'Sort out icon sizes', priority: 'low', assignee: 'Priya Nair', due: 'Mar 12, 2026' },
],
active: [
{ id: 't4', title: 'Migrate the billing page', priority: 'high', assignee: 'Jonas Weber', due: 'Mar 3, 2026' },
{ id: 't5', title: 'Add keyboard shortcuts', priority: 'medium', assignee: 'Aiko Sato', due: 'Mar 6, 2026' },
],
done: [
{ id: 't6', title: 'Set up preview deploys', priority: 'medium', assignee: 'Marta Nowak', due: 'Feb 26, 2026' },
{ id: 't7', title: 'Rename settings sections', priority: 'low', assignee: 'Owen Blake', due: 'Feb 24, 2026' },
],
};
/** Badge colors of the priorities. */
export const PRIORITY_CLASS: Record<Priority, string> = {
high: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-destructive)_12%,transparent)] [--wds-badge-fg:var(--wds-destructive)] [--wds-badge-border:transparent]',
medium: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-chart-3)_12%,transparent)] [--wds-badge-fg:var(--wds-chart-3)] [--wds-badge-border:transparent]',
low: '[--wds-badge-bg:color-mix(in_oklch,oklch(0.666_0.179_58.318)_14%,transparent)] [--wds-badge-fg:oklch(0.555_0.163_48.998)] [--wds-badge-border:transparent]',
};
/** Workflow with an empty column; `done` starts collapsed. */
export const WORKFLOW_COLUMNS: Record<string, string> = {
backlog: 'Backlog',
active: 'In progress',
blocked: 'Blocked',
review: 'In review',
done: 'Done',
};
export const WORKFLOW: Record<string, Task[]> = {
backlog: TASKS.backlog,
active: TASKS.active,
blocked: [],
review: [TASKS.done[0]],
done: [TASKS.done[1]],
};
export interface LabeledTask {
id: string;
title: string;
label: string;
}
export const STATUS_COLUMNS: Record<string, string> = {
todo: 'To do',
doing: 'In progress',
done: 'Done',
};
export const LABELED_TASKS: Record<string, LabeledTask[]> = {
todo: [
{ id: 'l1', title: 'Write the migration guide', label: 'Docs' },
{ id: 'l2', title: 'Fix the flaky upload test', label: 'QA' },
{ id: 'l3', title: 'Compress hero images', label: 'Performance' },
],
doing: [
{ id: 'l4', title: 'Refactor auth middleware', label: 'Backend' },
{ id: 'l5', title: 'Build the pricing table', label: 'Frontend' },
],
done: [{ id: 'l6', title: 'Kick-off with the client', label: 'Planning' }],
};
/** Badge colors of the labels. */
export const LABEL_CLASS: Record<string, string> = {
Docs: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-chart-2)_12%,transparent)] [--wds-badge-fg:var(--wds-chart-2)] [--wds-badge-border:transparent]',
QA: '[--wds-badge-bg:color-mix(in_oklch,oklch(0.596_0.145_163.225)_14%,transparent)] [--wds-badge-fg:oklch(0.508_0.118_165.612)] [--wds-badge-border:transparent]',
Performance: '[--wds-badge-bg:color-mix(in_oklch,oklch(0.666_0.179_58.318)_14%,transparent)] [--wds-badge-fg:oklch(0.555_0.163_48.998)] [--wds-badge-border:transparent]',
Backend: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-chart-4)_12%,transparent)] [--wds-badge-fg:var(--wds-chart-4)] [--wds-badge-border:transparent]',
Frontend: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-destructive)_12%,transparent)] [--wds-badge-fg:var(--wds-destructive)] [--wds-badge-border:transparent]',
Planning: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-chart-2)_12%,transparent)] [--wds-badge-fg:var(--wds-chart-2)] [--wds-badge-border:transparent]',
};
export interface ProgressTask {
id: string;
title: string;
assignee: string;
progress: number;
}
export const STAGES: Record<string, { title: string; description: string }> = {
planning: { title: 'Planning', description: 'Scoped and waiting for a slot' },
building: { title: 'Building', description: 'Being worked on this sprint' },
released: { title: 'Released', description: 'Live for all users' },
};
export const PROGRESS_TASKS: Record<string, ProgressTask[]> = {
planning: [{ id: 'p1', title: 'Survey current users', assignee: 'Lena P.', progress: 15 }],
building: [
{ id: 'p2', title: 'Design the new dashboard', assignee: 'Aiko S.', progress: 60 },
{ id: 'p3', title: 'Payments integration', assignee: 'Jonas W.', progress: 35 },
],
released: [{ id: 'p4', title: 'Repository setup', assignee: 'Marta N.', progress: 100 }],
};
export interface Feature {
id: string;
title: string;
description: string;
progress: number;
votes: number;
}
export const ROADMAP_COLUMNS: Record<string, { title: string; color: string }> = {
planned: { title: 'Planned', color: 'bg-blue-500' },
building: { title: 'Building', color: 'bg-amber-500' },
shipped: { title: 'Shipped', color: 'bg-emerald-500' },
};
export const FEATURES: Record<string, Feature[]> = {
planned: [
{ id: 'f1', title: 'Saved filters', description: 'Keep sets of filters and share them with the team', progress: 0, votes: 128 },
{ id: 'f2', title: 'Audit log export', description: 'Download account activity as a CSV file', progress: 0, votes: 87 },
],
building: [
{ id: 'f3', title: 'Offline mode', description: 'Keep working without a connection and sync later', progress: 55, votes: 211 },
{ id: 'f4', title: 'Granular roles', description: 'Custom permissions for each workspace', progress: 30, votes: 164 },
],
shipped: [
{ id: 'f5', title: 'Two-factor sign-in', description: 'One-time codes from an authenticator app', progress: 100, votes: 402 },
{ id: 'f6', title: 'Bulk edit', description: 'Change many records at once', progress: 100, votes: 175 },
],
};
/** Initials of a name for the avatar. */
export function initials(name: string): string {
return name
.split(' ')
.map((part) => part[0])
.join('')
.slice(0, 2)
.toUpperCase();
}
/** A pretend API call: answers after 700 ms and fails about once in four calls. */
export function saveBoard(): Promise<void> {
return new Promise((resolve, reject) => {
setTimeout(() => (Math.random() < 0.25 ? reject(new Error('Network error')) : resolve()), 700);
});
}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).
import { Component, computed, signal } from '@angular/core';
import { WdsBadgeComponent } from '@wds/angular/badge';
import { WdsCardComponent } from '@wds/angular/card';
import {
WdsKanbanColumnComponent,
WdsKanbanColumnContentComponent,
WdsKanbanColumnHandleComponent,
WdsKanbanComponent,
WdsKanbanItemComponent,
} from '@wds/angular/kanban';
import { toast } from '@wds/angular/toast';
import type { WdsKanbanCommitDetail } from '@wds/core/kanban';
import { PRIORITY_CLASS, saveBoard, TASK_COLUMNS, TASKS, type Task } from './kanban-data';
@Component({
selector: 'app-kanban-persisted-demo',
host: { class: 'block w-full' },
imports: [
WdsBadgeComponent,
WdsCardComponent,
WdsKanbanComponent,
WdsKanbanColumnComponent,
WdsKanbanColumnContentComponent,
WdsKanbanColumnHandleComponent,
WdsKanbanItemComponent,
],
template: `
<wds-kanban overlay="placeholder" [value]="columns()" (wdsChange)="columns.set($event.value)" (wdsCommit)="save($event)">
@for (column of entries(); track column[0]) {
<wds-kanban-column [value]="column[0]" [label]="titles[column[0]]">
<wds-card size="sm" class="h-full">
<span slot="title" class="flex items-center gap-2.5">
{{ titles[column[0]] }}
<wds-badge variant="outline">{{ column[1].length }}</wds-badge>
</span>
<wds-kanban-column-handle slot="action" />
<wds-kanban-column-content class="gap-2.5">
@for (task of column[1]; track task.id) {
<wds-kanban-item [value]="task.id" [label]="task.title">
<wds-card size="sm" class="[--wds-card-padding:12px]">
<div class="flex items-center justify-between gap-2">
<span class="line-clamp-2 text-sm font-medium">{{ task.title }}</span>
<wds-badge class="shrink-0 capitalize" [class]="priority[task.priority]">{{ task.priority }}</wds-badge>
</div>
</wds-card>
</wds-kanban-item>
}
</wds-kanban-column-content>
</wds-card>
</wds-kanban-column>
}
</wds-kanban>
`,
})
export class KanbanPersistedDemo {
protected readonly titles = TASK_COLUMNS;
protected readonly priority = PRIORITY_CLASS;
protected readonly columns = signal(TASKS);
protected readonly entries = computed(() => Object.entries(this.columns()));
/** Fires once per finished drag; the board already shows the move. */
protected save(commit: WdsKanbanCommitDetail<Task>): void {
const done =
commit.kind === 'column'
? `Moved the “${this.titles[commit.activeContainer]}” column`
: `Moved to “${this.titles[commit.overContainer]}”`;
toast.promise(saveBoard(), {
loading: 'Saving the board…',
success: done,
error: () => {
// Roll back to the board before the drag.
this.columns.set(commit.previousValue);
return 'Could not save. The board was restored.';
},
});
}
}export type Priority = 'low' | 'medium' | 'high';
export interface Task {
id: string;
title: string;
priority: Priority;
assignee: string;
due: string;
}
/** Column titles by key. */
export const TASK_COLUMNS: Record<string, string> = {
backlog: 'Backlog',
active: 'In progress',
done: 'Done',
};
export const TASKS: Record<string, Task[]> = {
backlog: [
{ id: 't1', title: 'Audit color tokens', priority: 'high', assignee: 'Lena Park', due: 'Mar 4, 2026' },
{ id: 't2', title: 'Draft onboarding emails', priority: 'medium', assignee: 'Tomás Ruiz', due: 'Mar 7, 2026' },
{ id: 't3', title: 'Sort out icon sizes', priority: 'low', assignee: 'Priya Nair', due: 'Mar 12, 2026' },
],
active: [
{ id: 't4', title: 'Migrate the billing page', priority: 'high', assignee: 'Jonas Weber', due: 'Mar 3, 2026' },
{ id: 't5', title: 'Add keyboard shortcuts', priority: 'medium', assignee: 'Aiko Sato', due: 'Mar 6, 2026' },
],
done: [
{ id: 't6', title: 'Set up preview deploys', priority: 'medium', assignee: 'Marta Nowak', due: 'Feb 26, 2026' },
{ id: 't7', title: 'Rename settings sections', priority: 'low', assignee: 'Owen Blake', due: 'Feb 24, 2026' },
],
};
/** Badge colors of the priorities. */
export const PRIORITY_CLASS: Record<Priority, string> = {
high: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-destructive)_12%,transparent)] [--wds-badge-fg:var(--wds-destructive)] [--wds-badge-border:transparent]',
medium: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-chart-3)_12%,transparent)] [--wds-badge-fg:var(--wds-chart-3)] [--wds-badge-border:transparent]',
low: '[--wds-badge-bg:color-mix(in_oklch,oklch(0.666_0.179_58.318)_14%,transparent)] [--wds-badge-fg:oklch(0.555_0.163_48.998)] [--wds-badge-border:transparent]',
};
/** Workflow with an empty column; `done` starts collapsed. */
export const WORKFLOW_COLUMNS: Record<string, string> = {
backlog: 'Backlog',
active: 'In progress',
blocked: 'Blocked',
review: 'In review',
done: 'Done',
};
export const WORKFLOW: Record<string, Task[]> = {
backlog: TASKS.backlog,
active: TASKS.active,
blocked: [],
review: [TASKS.done[0]],
done: [TASKS.done[1]],
};
export interface LabeledTask {
id: string;
title: string;
label: string;
}
export const STATUS_COLUMNS: Record<string, string> = {
todo: 'To do',
doing: 'In progress',
done: 'Done',
};
export const LABELED_TASKS: Record<string, LabeledTask[]> = {
todo: [
{ id: 'l1', title: 'Write the migration guide', label: 'Docs' },
{ id: 'l2', title: 'Fix the flaky upload test', label: 'QA' },
{ id: 'l3', title: 'Compress hero images', label: 'Performance' },
],
doing: [
{ id: 'l4', title: 'Refactor auth middleware', label: 'Backend' },
{ id: 'l5', title: 'Build the pricing table', label: 'Frontend' },
],
done: [{ id: 'l6', title: 'Kick-off with the client', label: 'Planning' }],
};
/** Badge colors of the labels. */
export const LABEL_CLASS: Record<string, string> = {
Docs: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-chart-2)_12%,transparent)] [--wds-badge-fg:var(--wds-chart-2)] [--wds-badge-border:transparent]',
QA: '[--wds-badge-bg:color-mix(in_oklch,oklch(0.596_0.145_163.225)_14%,transparent)] [--wds-badge-fg:oklch(0.508_0.118_165.612)] [--wds-badge-border:transparent]',
Performance: '[--wds-badge-bg:color-mix(in_oklch,oklch(0.666_0.179_58.318)_14%,transparent)] [--wds-badge-fg:oklch(0.555_0.163_48.998)] [--wds-badge-border:transparent]',
Backend: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-chart-4)_12%,transparent)] [--wds-badge-fg:var(--wds-chart-4)] [--wds-badge-border:transparent]',
Frontend: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-destructive)_12%,transparent)] [--wds-badge-fg:var(--wds-destructive)] [--wds-badge-border:transparent]',
Planning: '[--wds-badge-bg:color-mix(in_oklch,var(--wds-chart-2)_12%,transparent)] [--wds-badge-fg:var(--wds-chart-2)] [--wds-badge-border:transparent]',
};
export interface ProgressTask {
id: string;
title: string;
assignee: string;
progress: number;
}
export const STAGES: Record<string, { title: string; description: string }> = {
planning: { title: 'Planning', description: 'Scoped and waiting for a slot' },
building: { title: 'Building', description: 'Being worked on this sprint' },
released: { title: 'Released', description: 'Live for all users' },
};
export const PROGRESS_TASKS: Record<string, ProgressTask[]> = {
planning: [{ id: 'p1', title: 'Survey current users', assignee: 'Lena P.', progress: 15 }],
building: [
{ id: 'p2', title: 'Design the new dashboard', assignee: 'Aiko S.', progress: 60 },
{ id: 'p3', title: 'Payments integration', assignee: 'Jonas W.', progress: 35 },
],
released: [{ id: 'p4', title: 'Repository setup', assignee: 'Marta N.', progress: 100 }],
};
export interface Feature {
id: string;
title: string;
description: string;
progress: number;
votes: number;
}
export const ROADMAP_COLUMNS: Record<string, { title: string; color: string }> = {
planned: { title: 'Planned', color: 'bg-blue-500' },
building: { title: 'Building', color: 'bg-amber-500' },
shipped: { title: 'Shipped', color: 'bg-emerald-500' },
};
export const FEATURES: Record<string, Feature[]> = {
planned: [
{ id: 'f1', title: 'Saved filters', description: 'Keep sets of filters and share them with the team', progress: 0, votes: 128 },
{ id: 'f2', title: 'Audit log export', description: 'Download account activity as a CSV file', progress: 0, votes: 87 },
],
building: [
{ id: 'f3', title: 'Offline mode', description: 'Keep working without a connection and sync later', progress: 55, votes: 211 },
{ id: 'f4', title: 'Granular roles', description: 'Custom permissions for each workspace', progress: 30, votes: 164 },
],
shipped: [
{ id: 'f5', title: 'Two-factor sign-in', description: 'One-time codes from an authenticator app', progress: 100, votes: 402 },
{ id: 'f6', title: 'Bulk edit', description: 'Change many records at once', progress: 100, votes: 175 },
],
};
/** Initials of a name for the avatar. */
export function initials(name: string): string {
return name
.split(' ')
.map((part) => part[0])
.join('')
.slice(0, 2)
.toUpperCase();
}
/** A pretend API call: answers after 700 ms and fails about once in four calls. */
export function saveBoard(): Promise<void> {
return new Promise((resolve, reject) => {
setTimeout(() => (Math.random() < 0.25 ? reject(new Error('Network error')) : resolve()), 700);
});
}API References#
wds-kanban#
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
| Attribute | Type | Default | Description |
|---|---|---|---|
| overlay | WdsKanbanOverlay | 'clone' | |
| restore-on-cancel.restoreOnCancel | boolean | false |
Properties
| Property | Description |
|---|---|
| valueRecord<string, T[]> | undefined | wds-change. Without it the board reads and moves the elements. |
| getItemValue(item: T) => string | value of its wds-kanban-item). Defaults to id, then value, then the card itself. |
Events
| Event | Description |
|---|---|
| wds-changeCustomEvent<WdsKanbanChangeDetail> | restore-on-cancel. |
| wds-commitCustomEvent<WdsKanbanCommitDetail> | |
| wds-drag-startCustomEvent<WdsKanbanDragDetail> | |
| wds-drag-endCustomEvent<WdsKanbanDragDetail> | |
| wds-drag-cancelCustomEvent<WdsKanbanDragDetail> |
Slots
| Slot | Description |
|---|---|
| (default) | wds-kanban-column elements. |
CSS custom properties
| Property | Description |
|---|---|
| --wds-kanban-gap | |
| --wds-kanban-column-width | |
| --wds-kanban-column-collapsed-width |
wds-kanban-column#
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
| Attribute | Type | Default | Description |
|---|---|---|---|
| value | string | '' | value. |
| label | string | '' | value). |
| collapsed | boolean | false | |
| disabled | boolean | false |
Slots
| Slot | Description |
|---|---|
| (default) | wds-kanban-column-content. |
wds-kanban-column-handle#
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
| Attribute | Type | Default | Description |
|---|---|---|---|
| label | string | '' |
Slots
| Slot | Description |
|---|---|
| (default) |
wds-kanban-column-content#
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
| Slot | Description |
|---|---|
| (default) | wds-kanban-item elements. |
| empty | empty attribute while it has no cards. |
wds-kanban-item#
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
| Attribute | Type | Default | Description |
|---|---|---|---|
| value | string | '' | getItemValue returns for it. |
| label | string | '' | value). |
| disabled | boolean | false |
Slots
| Slot | Description |
|---|---|
| (default) |
wds-kanban-item-handle#
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
| Slot | Description |
|---|---|
| (default) |
Accessibility#
Screen reader#
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".
label so the announcements use their names instead of their identifiers.
label on the handle overrides it. The copy that follows the pointer is aria-hidden.
Keyboard support#
| Key | Function |
|---|---|
restore-on-cancel the board goes back to how it was before. |