Skip to main content

cardListStart

React 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?: ComponentType<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​

import { Kanban } from "@svar-ui/react-kanban";
import ListStart from "./ListStart.jsx";

<Kanban cards={cards} columns={columns} cardListStart={ListStart} />;
// ListStart.jsx
function ListStart({ column, swimlane, cards }) {
return (
<div className="intro">
<strong>
{column.label}
{swimlane ? ` / ${swimlane.label}` : ""}
</strong>
<span>{cards.length} cards</span>
</div>
);
}

export default ListStart;