Skip to main content

cardListStart

Svelte component rendered before the cards of each expanded card area - a column, a swimlane cell, or a stack group. Use it for per-area headers, notes, or summaries that scroll with the cards.

The rendered content isn't a card. It can't be dragged, it isn't counted, and double-clicking it doesn't add a card. It's absent from collapsed areas and from exports. A card dropped over it is inserted at the start of the area.

Usage​

cardListStart?: Component<CardListSlotProps>;

type CardListSlotProps = {
column: ColumnView;
swimlane?: SwimlaneView;
cards: KanbanCard[];
readonly: boolean;
};
FieldTypeDescription
columnColumnViewThe projected column the area belongs to
swimlaneSwimlaneViewThe swimlane of a swimlane cell or lane stack group; absent for an ordinary column (Pro)
cardsKanbanCard[]All filtered and sorted cards of the area, including cards outside the virtual range
readonlybooleanCurrent value of the readonly prop; the component should honor it

Example​

<script>
import { Kanban } from "@svar-ui/svelte-kanban";
import ListStart from "./ListStart.svelte";
</script>

<Kanban {cards} {columns} cardListStart={ListStart} />
<!-- ListStart.svelte -->
<script>
const { column, swimlane, cards } = $props();
</script>

<div class="intro">
<strong>{column.label}{swimlane ? ` / ${swimlane.label}` : ""}</strong>
<span>{cards.length} cards</span>
</div>