Skip to main content

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[];
FieldTypeDescription
idstring | numberUnique lane identifier
labelstringDisplay text in the lane header
collapsedbooleanInitial collapsed state of the lane
cssstringCSS class name(s) applied to the lane
metadataRecord<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>
import { Kanban } from "@svar-ui/svelte-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>

<Kanban {cards} {columns} {swimlanes} swimlaneAccessor="team" />