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;
};
| Field | Type | Description |
|---|---|---|
column | ColumnView | The projected column the area belongs to |
swimlane | SwimlaneView | The swimlane of a swimlane cell or lane stack group; absent for an ordinary column (Pro) |
cards | KanbanCard[] | All filtered and sorted cards of the area, including cards outside the virtual range |
readonly | boolean | Current 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>
Related
- cardListEnd - component rendered after the cards of each area
- cardContent - custom card body component
- Cards guide - card data shape and custom card body