swimlanes
PRO
The functionality is available in PRO Edition only
Defines swimlanes: horizontal groups stacked vertically across the columns. The array order sets the lane order from top to bottom.
Optional. When omitted, the board infers lanes from the cards' swimlaneAccessor values. It creates one lane per distinct value, in the order the values first appear, and labels each lane with String(value). Pass [] to keep an ordinary board without lanes.
Usage
swimlanes?: SwimlaneConfig[];
| Field | Type | Description |
|---|---|---|
id | string | number | Unique lane identifier |
label | string | Display text in the lane header |
collapsed | boolean | Initial collapsed state of the lane |
css | string | CSS class name(s) applied to the lane |
metadata | Record<string, any> | Arbitrary data attached to the lane |
Numeric and string IDs are distinct, so 1 and "1" are two different lanes. Empty lanes stay visible. Cards whose lane value doesn't match any lane don't show on the board, but they stay in getCards().
In the MIT edition, the prop has no effect.
Example
<script setup>
import { Kanban } from "@svar-ui/vue-kanban";
const columns = [
{ id: "todo", label: "To Do" },
{ id: "doing", label: "In Progress" },
{ id: "done", label: "Done" },
];
const swimlanes = [
{ id: "product", label: "Product" },
{ id: "platform", label: "Platform", collapsed: true },
];
const cards = [
{ id: 1, label: "Pricing page", column: "todo", team: "product" },
{ id: 2, label: "Upgrade database", column: "doing", team: "platform" },
];
</script>
<template>
<Kanban
:cards="cards"
:columns="columns"
:swimlanes="swimlanes"
swimlaneAccessor="team"
/>
</template>
Related
- Swimlanes guide - inference, collapse, scrolling, and lane actions
- swimlaneAccessor - controls card-to-lane membership
- columns - the column axis of the board
- update-swimlane - patch lane config at runtime