View as Markdown

API reference: @salmonui/kanban

KanbanColumnDefinterface

import type { KanbanColumnDef } from '@salmonui/kanban';
interface KanbanColumnDef {
    readonly key?: KanbanKey | undefined;
    readonly keys?: readonly KanbanKey[] | undefined;
    readonly header: string;
    readonly collapsible?: boolean | undefined;
    readonly count?: boolean | undefined;
    readonly renderHeader?: ((ctx: KanbanColumnContext) => ReactNode) | undefined;
    readonly min?: number | undefined;
    readonly max?: number | undefined;
    readonly addButton?: boolean | undefined;
    readonly draggable?: boolean | undefined;
    readonly droppable?: boolean | undefined;
    readonly allowedTargets?: readonly KanbanKey[] | undefined;
    readonly hidden?: boolean | undefined;
    readonly className?: string | undefined;
}

One column of the board.

KanbanColumnDef members (14)
NameSignatureDescription
keyoptionalreadonly key?: KanbanKey | undefined;

Column value that maps a card to this column (the columnField value).

keysoptionalreadonly keys?: readonly KanbanKey[] | undefined;

Several column values shown in one column; moves write the first.

headerreadonly header: string;

Header text; also the accessible name of the column.

collapsibleoptionalreadonly collapsible?: boolean | undefined;

Shows the collapse toggle (default false).

countoptionalreadonly count?: boolean | undefined;

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

renderHeaderoptionalreadonly renderHeader?: ((ctx: KanbanColumnContext) => ReactNode) | undefined;

Replaces the header text content. Pure; the toggle, count and add button stay.

minoptionalreadonly min?: number | undefined;

WIP minimum.

maxoptionalreadonly max?: number | undefined;

WIP maximum.

addButtonoptionalreadonly addButton?: boolean | undefined;

Shows an add button at the end of every cell of the column.

draggableoptionalreadonly draggable?: boolean | undefined;

Cards may be dragged out of this column (default true).

droppableoptionalreadonly droppable?: boolean | undefined;

Cards may be dropped into this column (default true).

allowedTargetsoptionalreadonly allowedTargets?: readonly KanbanKey[] | undefined;

Columns that cards of this column may move to (default: every droppable column).

hiddenoptionalreadonly hidden?: boolean | undefined;

Hides the column.

classNameoptionalreadonly className?: string | undefined;