s-m-r-t
Open the s-m-r-t source on GitHub Switch to dark color scheme
← All UI components

Svelte · Board

Board

No summary has been written for Board. Everything below is generated from the declaration shipped in 0.57.40 and describes the real contract.

Public export

typescript
import { Board } from '@happyvertical/smrt-svelte/board';
Import path
@happyvertical/smrt-svelte/board
Props
15
Props described
15 of 15
Bindable state
0
Callback events
2
Verified release
0.57.40

Props

NameTypeRequiredDescription
columnsreadonly Column[]YesOrdered lanes. The Board does not impose statuses or workflow names.
cardsreadonly Card[]NoAuthoritative controlled cards. Omit to use `defaultCards`.
defaultCardsreadonly Card[]NoInitial cards for an uncontrolled Board.
getCardColumnId(card: Card) => stringYesResolves the lane containing a card.
setCardColumnId(card: Card, columnId: string) => CardYesReturns a copy of a card assigned to `columnId`; keeps Board domain-free.
getCardLabel(card: Card) => stringYesAccessible text announced while a card is moved.
cardSnippet<[BoardCardSnippetProps<Card, Column>]>YesRequired visual content for each card.
columnHeaderSnippet<[BoardColumnHeaderSnippetProps<Column>]>NoOptional lane-header content, rendered beside the built-in count.
labelstringNoAccessible name for the board.
collapsiblebooleanNoMakes lane headers collapse their card lists.
allowSameColumnReorderbooleanNoWhether cards may be repositioned within their current lane. Defaults to `true`; set `false` for adapters whose persistence layer only supports column/status transitions.
laneWidthstringNoLane width as any CSS length (e.g. `"15rem"`). Sets the `--smrt-board-lane-width` custom property, which a host may also set from CSS. Defaults to `min(18rem, 82vw)`.
optimisticbooleanNoIn controlled mode, retain the locally reordered presentation until the owner supplies a new `cards` array. The owner remains authoritative.
onselect(card: Card) => voidNoCalled when a card is activated without starting a move.
onmove(intent: BoardMoveIntent<Card, Column>) => void | Promise<void>NoReceives a typed move intent. It may persist asynchronously; a rejection restores the existing presentation and is announced to assistive tech.

Bindable state

This component has no bindable public state.

Callback events

  • onselect(card: Card) => void
  • onmove(intent: BoardMoveIntent<Card, Column>) => void | Promise<void>

Examples and explanation