View as Markdown

API reference: @salmonui/kanban

KanbanSwimlanesinterface

import type { KanbanSwimlanes } from '@salmonui/kanban';
interface KanbanSwimlanes {
    readonly field: string;
    readonly labelField?: string | undefined;
    readonly lanes?: readonly KanbanSwimlaneDef[] | undefined;
    readonly renderHeader?: ((ctx: KanbanSwimlaneContext) => ReactNode) | undefined;
    readonly sort?: 'asc' | 'desc' | ((a: KanbanSwimlaneContext, b: KanbanSwimlaneContext) => number) | undefined;
    readonly showEmpty?: boolean | undefined;
    readonly count?: boolean | undefined;
    readonly unassigned?: boolean | undefined;
    readonly sticky?: boolean | undefined;
    readonly draggable?: boolean | undefined;
}

Swimlane options.

KanbanSwimlanes members (10)
NameSignatureDescription
fieldreadonly field: string;

Card field holding the swimlane key.

labelFieldoptionalreadonly labelField?: string | undefined;

Card field holding the lane label (default: the key).

lanesoptionalreadonly lanes?: readonly KanbanSwimlaneDef[] | undefined;

Declared lanes: their order and labels; with showEmpty they render without cards.

renderHeaderoptionalreadonly renderHeader?: ((ctx: KanbanSwimlaneContext) => ReactNode) | undefined;
sortoptionalreadonly sort?: 'asc' | 'desc' | ((a: KanbanSwimlaneContext, b: KanbanSwimlaneContext) => number) | undefined;

Lane order: by label, or a comparator (default: declared lanes, then first appearance).

showEmptyoptionalreadonly showEmpty?: boolean | undefined;

Renders declared lanes that have no cards (default false).

countoptionalreadonly count?: boolean | undefined;

Shows the card count in the lane header (default true).

unassignedoptionalreadonly unassigned?: boolean | undefined;

Cards without a lane key go to an "Unassigned" lane (default true); false hides them.

stickyoptionalreadonly sticky?: boolean | undefined;

Lane headers stick to the top while the board scrolls.

draggableoptionalreadonly draggable?: boolean | undefined;

Cards may be dragged across lanes (default false).