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;
};
| 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
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;
Related
- cardListEnd - component rendered after the cards of each area
- cardContent - custom card body component
- Cards guide - card data shape and custom card body