TimelineKit

API Reference

Properties

data: KanbanDataData container — columns, cards, and swimlanes (read-only).
settings: KanbanBoardSettingsSettings object — access theme and locale (read-only).
events: KanbanBoardEventsEvent emitters (read-only).
selectedCards: KanbanCard[]Currently selected cards.
selectedCard: KanbanCard | nullLast selected card (or null).
canEdit: booleanEnable/disable editing. Default: true.
cardRendering: CardRenderFn | nullCustom card rendering function.
cardTooltip: CardTooltipFn | nullCustom tooltip content function.
assigneeResolver: AssigneeResolverFn | nullFunction to resolve assignee IDs to names and avatars.
canUndo$: BehaviorSubject<boolean>Whether undo is available (observable, read-only).
canRedo$: BehaviorSubject<boolean>Whether redo is available (observable, read-only).

Methods

load(json: string): voidLoad board state from a JSON string.
save(): stringSerialize current state to a JSON string.
undo(): voidUndo the last action.
redo(): voidRedo the last undone action.
clearUndoHistory(): voidClear the undo/redo history.
beginBatch(): voidStart batching operations into a single undo step.
endBatch(): voidEnd batching and commit the undo step.
copyCards(cards?: KanbanCard[]): voidCopy cards to clipboard (defaults to selected).
cutCards(cards?: KanbanCard[]): voidCut cards to clipboard.
pasteCards(columnId: string, swimlaneId?: string | null): voidPaste cards into a column.
scrollToCard(card: KanbanCard, options?: KanbanScrollOptions): voidScroll to bring a card into view.
scrollToColumn(column: KanbanColumn, options?: KanbanScrollOptions): voidScroll to bring a column into view.
scrollToSwimlane(swimlane: KanbanSwimlane, options?: KanbanScrollOptions): voidScroll to bring a swimlane into view.

Data Methods

Accessed via board.data.

Column Methods

columnsLength: numberNumber of columns.
getColumn(index: number): KanbanColumnGet column by index.
getColumnById(id: string): KanbanColumn | nullGet column by ID.
addColumn(column: KanbanColumn): voidAdd a column at the end.
insertColumn(index: number, column: KanbanColumn): voidInsert a column at index.
removeColumn(column: KanbanColumn): voidRemove a column.
moveColumn(column: KanbanColumn, toIndex: number): voidMove a column to a new index.
assignColumns(columns: KanbanColumn[]): voidReplace all columns.

Card Methods

cardsLength: numberTotal number of cards.
getCard(index: number): KanbanCardGet card by global index.
getCardById(id: string): KanbanCard | nullGet card by ID.
getCardsInColumn(columnId: string): KanbanCard[]Get all cards in a column.
getCardsInSwimlane(swimlaneId: string | null): KanbanCard[]Get all cards in a swimlane.
getCardCountInColumn(columnId: string): numberCount cards in a column.
isWipLimitExceeded(columnId: string): booleanCheck if column exceeds its WIP limit.
getCardColor(card: KanbanCard): ColorValueResolve the effective color for a card (inherits from column if card color is null).
addCard(card: KanbanCard): voidAdd a card at the end of its column.
insertCard(card: KanbanCard, indexInColumn: number): voidInsert a card at index within its column.
removeCard(card: KanbanCard): voidRemove a card.
moveCard(card: KanbanCard, toColumnId: string, toIndexInColumn: number): voidMove a card to a column at index.
assignCards(cards: KanbanCard[]): voidReplace all cards.
filter: KanbanCardFilterFn | nullFilter function. Filtered-out cards are hidden.

Swimlane Methods

swimlanesLength: numberNumber of swimlanes.
getSwimlane(index: number): KanbanSwimlaneGet swimlane by index.
getSwimlaneById(id: string): KanbanSwimlane | nullGet swimlane by ID.
addSwimlane(swimlane: KanbanSwimlane): voidAdd a swimlane at the end.
insertSwimlane(index: number, swimlane: KanbanSwimlane): voidInsert a swimlane at index.
removeSwimlane(swimlane: KanbanSwimlane): voidRemove a swimlane.
moveSwimlane(swimlane: KanbanSwimlane, toIndex: number): voidMove a swimlane to a new index.
assignSwimlanes(swimlanes: KanbanSwimlane[]): voidReplace all swimlanes.

General

clear(): voidRemove all columns, cards, and swimlanes.

Events

All events are RxJS Subject instances. Subscribe via board.events.eventName$.subscribe(callback).

Data Events

columnAdded$: Subject<KanbanColumnEventArgs>A column was added.
columnChanged$: Subject<KanbanColumnEventArgs>A column property changed.
columnRemoved$: Subject<KanbanColumnEventArgs>A column was removed.
columnMoved$: Subject<KanbanColumnMovedEventArgs>A column was moved (fromIndex, toIndex).
cardAdded$: Subject<KanbanCardEventArgs>A card was added.
cardChanged$: Subject<KanbanCardEventArgs>A card property changed.
cardRemoved$: Subject<KanbanCardEventArgs>A card was removed.
cardMoved$: Subject<KanbanCardMovedEventArgs>A card was moved (fromColumnId, toColumnId, toIndex).
swimlaneAdded$: Subject<KanbanSwimlaneEventArgs>A swimlane was added.
swimlaneChanged$: Subject<KanbanSwimlaneEventArgs>A swimlane property changed.
swimlaneRemoved$: Subject<KanbanSwimlaneEventArgs>A swimlane was removed.
swimlaneMoved$: Subject<KanbanSwimlaneMovedEventArgs>A swimlane was moved (fromIndex, toIndex).

Card Interaction Events

cardClick$: Subject<CardClickArgs>A card was clicked. Args: { card, domEvent }.
cardDblClick$: Subject<CardDblClickArgs>A card was double-clicked. Args: { card, domEvent }.
cardContextMenu$: Subject<CardContextMenuArgs>A card was right-clicked. Args: { card, domEvent }.

Column Interaction Events

columnClick$: Subject<ColumnClickArgs>A column header was clicked. Args: { column, domEvent }.
columnDblClick$: Subject<ColumnDblClickArgs>A column header was double-clicked. Args: { column, domEvent }.
columnContextMenu$: Subject<ColumnContextMenuArgs>A column header was right-clicked. Args: { column, domEvent }.
columnEmptyClick$: Subject<ColumnEmptyClickArgs>Empty column area was clicked. Args: { column, swimlane, domEvent }.
columnEmptyDblClick$: Subject<ColumnEmptyDblClickArgs>Empty column area was double-clicked. Args: { column, swimlane, domEvent }.
columnEmptyContextMenu$: Subject<ColumnEmptyContextMenuArgs>Empty column area was right-clicked. Args: { column, swimlane, domEvent }.

Swimlane Interaction Events

swimlaneClick$: Subject<SwimlaneClickArgs>A swimlane header was clicked. Args: { swimlane, domEvent }.
swimlaneDblClick$: Subject<SwimlaneDblClickArgs>A swimlane header was double-clicked. Args: { swimlane, domEvent }.
swimlaneContextMenu$: Subject<SwimlaneContextMenuArgs>A swimlane header was right-clicked. Args: { swimlane, domEvent }.

Board Events

boardContextMenu$: Subject<BoardContextMenuArgs>Board background was right-clicked. Args: { domEvent }.

Drag Events (Cancelable)

cardMoving$: Subject<CardMovingArgs>A card is being moved by drag (before mutation). Args: { card, fromColumnId, toColumnId, toIndex, toSwimlaneId, cancel }.
cardMovedByDrag$: Subject<CardMovedArgs>A card was moved by drag (after mutation). Args: { card, fromColumnId, toColumnId, toIndex }.
cardDeleting$: Subject<CardDeletingArgs>A card is about to be deleted. Args: { card, cancel }.
columnMoving$: Subject<ColumnMovingArgs>A column is being reordered by drag. Args: { column, fromIndex, toIndex, cancel }.
columnMovedByDrag$: Subject<ColumnMovedByDragArgs>A column was reordered by drag. Args: { column, fromIndex, toIndex }.
swimlaneMoving$: Subject<SwimlaneMovingArgs>A swimlane is being reordered by drag. Args: { swimlane, fromIndex, toIndex, cancel }.
swimlaneMovedByDrag$: Subject<SwimlaneMovedByDragArgs>A swimlane was reordered by drag. Args: { swimlane, fromIndex, toIndex }.

Selection & State Events

selectedCardsChanged$: Subject<KanbanCard[]>Card selection changed.
hoveredCardChanged$: Subject<KanbanCard | null>Hovered card changed.
undone$: Subject<void>An undo operation was performed.
redone$: Subject<void>A redo operation was performed.

Types & Enums

Core Types

CardPriority'none' | 'low' | 'medium' | 'high' | 'critical'
KanbanCardFilterFn(card: KanbanCard) => boolean
KanbanScrollOptions{ behavior?: ScrollBehavior }
KanbanBoardSerialized{ columns: any[]; cards: any[]; swimlanes: any[] }

Rendering & Resolver Types

CardRenderFn(args: CardRenderArgs) => boolean | void
CardRenderArgs{ card: KanbanCard; element: HTMLElement; column: KanbanColumn; swimlane: KanbanSwimlane | null; color: KanbanCardColor }
CardTooltipFn(args: CardTooltipArgs) => CardTooltipContent | null | Promise<CardTooltipContent | null>
CardTooltipArgs{ card: KanbanCard }
CardTooltipContent{ title: string; rows?: { label: string; value: string }[] }
AssigneeResolverFn(id: string) => KanbanAssignee | null
KanbanAssignee{ name: string; imageUrl?: string; color?: string }

Data Event Args

KanbanColumnEventArgs{ column: KanbanColumn }
KanbanCardEventArgs{ card: KanbanCard }
KanbanSwimlaneEventArgs{ swimlane: KanbanSwimlane }
KanbanColumnMovedEventArgs{ column: KanbanColumn; fromIndex: number; toIndex: number }
KanbanCardMovedEventArgs{ card: KanbanCard; fromColumnId: string; toColumnId: string; toIndex: number }
KanbanSwimlaneMovedEventArgs{ swimlane: KanbanSwimlane; fromIndex: number; toIndex: number }

Interaction Event Args

CardClickArgs{ card: KanbanCard; domEvent: MouseEvent }
CardDblClickArgs{ card: KanbanCard; domEvent: MouseEvent }
CardContextMenuArgs{ card: KanbanCard; domEvent: MouseEvent }
ColumnClickArgs{ column: KanbanColumn; domEvent: MouseEvent }
ColumnDblClickArgs{ column: KanbanColumn; domEvent: MouseEvent }
ColumnContextMenuArgs{ column: KanbanColumn; domEvent: MouseEvent }
SwimlaneClickArgs{ swimlane: KanbanSwimlane; domEvent: MouseEvent }
SwimlaneDblClickArgs{ swimlane: KanbanSwimlane; domEvent: MouseEvent }
SwimlaneContextMenuArgs{ swimlane: KanbanSwimlane; domEvent: MouseEvent }
ColumnEmptyClickArgs{ column: KanbanColumn; swimlane: KanbanSwimlane | null; domEvent: MouseEvent }
ColumnEmptyDblClickArgs{ column: KanbanColumn; swimlane: KanbanSwimlane | null; domEvent: MouseEvent }
ColumnEmptyContextMenuArgs{ column: KanbanColumn; swimlane: KanbanSwimlane | null; domEvent: MouseEvent }
BoardContextMenuArgs{ domEvent: MouseEvent }

Drag Event Args

CardMovingArgs{ card: KanbanCard; fromColumnId: string; toColumnId: string; toIndex: number; toSwimlaneId: string | null; cancel: boolean }
CardMovedArgs{ card: KanbanCard; fromColumnId: string; toColumnId: string; toIndex: number }
CardDeletingArgs{ card: KanbanCard; cancel: boolean }
ColumnMovingArgs{ column: KanbanColumn; fromIndex: number; toIndex: number; cancel: boolean }
ColumnMovedByDragArgs{ column: KanbanColumn; fromIndex: number; toIndex: number }
SwimlaneMovingArgs{ swimlane: KanbanSwimlane; fromIndex: number; toIndex: number; cancel: boolean }
SwimlaneMovedByDragArgs{ swimlane: KanbanSwimlane; fromIndex: number; toIndex: number }