Skip to main content

Kanban

Ant Design

The Kanban component shows records as cards in columns by status, such as tasks under To do, In progress and Done. Users drag cards between columns, and the application saves each change with a query.

Properties​

Property
Description
Expected Value
CardsThe cards to show, usually a query's data, such as {{queries.getTasks.data}}. Each record becomes one card.Array
Columns (in order)The columns, in order, as a list of {id, title}. Add color to show a colored dot in the header. A card whose status no column lists gets its own column at the end.Array
Status fieldField on each card that holds the id of the column it belongs in.Text. Default: status
Id fieldField that identifies each card, used by the actions and in the event data.Text. Default: id
Card contentWhat each card shows. fields shows the fields set below; custom repeats the components placed in the first card for every card, which read the card as {{cardData}}.Fields, Custom. Default: Fields
Card height (custom content)Least height of each card when Card content is custom, in pixels. A card grows to fit its components.Number. Default: 96
Title fieldField shown as each card's title.Text. Default: title
Description fieldField shown under the title.Text. Default: description
Badge field (priority, severity)Field shown as a colored tag, such as a priority. Words such as High or Low get matching colors.Text. Default: priority
Tags field (a list)Field that holds a list of labels, each shown as a tag.Text
Progress field (0 to 100)Field that holds a number from 0 to 100, shown as a progress bar.Text
Meta field (a date, a count)Field shown as small text on the card, such as a due date or a count.Text
Avatar field (a name or image URL)Field shown as an avatar on the card. An image URL shows the picture; a name shows its initials.Text. Default: owner
Details field (shown on the clicked card)Field shown as a list of label and value pairs when the user clicks the card. It can hold an object of label and value, a list of {label, value} or plain text.Text
Card densitycompact uses less padding on each card, so more cards fit.Comfortable, Compact. Default: Comfortable
Collapsed card height (px, empty: show all)Height in pixels that a long card is cut to, with a Show more button to open it. Leave it empty to show cards in full.Text
Column width (px, empty: fill the board)Width of each column in pixels. Leave it empty for columns of equal width that fill the board.Text
Card count on columnsShows the number of cards in each column's header.On or off. Default: On
Collapsible columnsShows a button in each column's header that folds the column to a narrow strip.On or off. Default: On
Columns collapsed at start (ids)Ids of the columns that are folded when the app loads.Array
Drag to moveLets users move cards between and within columns by dragging, or with the keyboard.On or off. Default: On
Add card button on columnsShows an Add card button at the bottom of each column. It fires On add card click, and the application adds the card.On or off. Default: Off
Delete button on cardsShows a delete button on each card that removes it from the board.On or off. Default: Off
Empty column messageMessage shown in a column with no cards.Text. Default: No cards
Badge colours by valueColors for badge values, such as { High: '#dc2626' }. A value can also be {text, background} to set both colors.Object

Additional Actions​

Each of these can be switched on or off, or set with a logical expression by clicking fx.

Property
Description
Expected Value
VisibilityShows or hides the component. Hidden components keep their space unless Collapse when hidden is on.On or off. Default: On
Collapse when hiddenRemoves the hidden component's space, so the components below it move up.On or off. Default: Off
Loading stateShows the component's loading look and blocks interaction, for example while a query runs.On or off. Default: Off
DisableStops the user from interacting with the component.On or off. Default: Off

Devices​

Property
Description
Expected Value
Show on desktopShows the component in the desktop layout.On or off. Default: On
Show on mobileShows the component in the mobile layout.On or off. Default: Off

Events​

Add a handler from the Events section of the properties panel. See Event Triggers for the steps.

Event
Description
On card movedTriggers when a card moves to another column or place, by the user or the Move card action.
On add card clickTriggers when the user clicks a column's Add card button.
On card addedTriggers when the Add card action adds a card.
On card updatedTriggers when the Update card data action changes a card.
On card removedTriggers when a card is deleted, by its delete button or the Delete card action.
On card selectedTriggers when the user clicks a card to select it. Clicking the selected card again clears the selection without firing this event.
On updateTriggers when the cards change in any way: a move, an add, an update or a delete.

Component Specific Actions (CSA)​

Run these from an event handler with Control Component, or from a RunJS query. See Component Specific Actions.

Action
Description
How To Access
Add cardAdds the given Card to the board, in the column given by Column id, else in the column its status names, else in the first column.components.kanban1.addCard("{{{ title: 'New card' }}}", "")
Move cardMoves the card with the given Card id to the end of the column with the given Column id.components.kanban1.moveCard("", "")
Delete cardRemoves the card with the given Card id from the board.components.kanban1.deleteCard("")
Update card dataChanges fields of the card with the given Card id to the given Values, such as { title: 'Renamed' }.components.kanban1.updateCardData("", "{{{ title: 'Renamed' }}}")
Clear selectionClears the selected card and closes its details.components.kanban1.clearSelection()
Set visibilityShows the component when true, hides it when false.components.kanban1.setVisibility(false)
Set disableDisables the component when true, enables it when false.components.kanban1.setDisable(false)
Set loadingTurns the loading state on with true, off with false.components.kanban1.setLoading(false)

Exposed Variables​

Variable
Description
How To Access
dataSourceThe cards to show, usually a query's data, such as {{queries.getTasks.data}}. Each record becomes one card.{{components.kanban1.dataSource}}
columnsThe columns, in order, as a list of {id, title}. Add color to show a colored dot in the header. A card whose status no column lists gets its own column at the end.{{components.kanban1.columns}}
statusFieldField on each card that holds the id of the column it belongs in.{{components.kanban1.statusField}}
idFieldField that identifies each card, used by the actions and in the event data.{{components.kanban1.idField}}
cardLayoutWhat each card shows. fields shows the fields set below; custom repeats the components placed in the first card for every card, which read the card as {{cardData}}.{{components.kanban1.cardLayout}}
cardHeightLeast height of each card when Card content is custom, in pixels. A card grows to fit its components.{{components.kanban1.cardHeight}}
titleFieldField shown as each card's title.{{components.kanban1.titleField}}
descriptionFieldField shown under the title.{{components.kanban1.descriptionField}}
badgeFieldField shown as a colored tag, such as a priority. Words such as High or Low get matching colors.{{components.kanban1.badgeField}}
tagsFieldField that holds a list of labels, each shown as a tag.{{components.kanban1.tagsField}}
progressFieldField that holds a number from 0 to 100, shown as a progress bar.{{components.kanban1.progressField}}
metaFieldField shown as small text on the card, such as a due date or a count.{{components.kanban1.metaField}}
avatarFieldField shown as an avatar on the card. An image URL shows the picture; a name shows its initials.{{components.kanban1.avatarField}}
detailsFieldField shown as a list of label and value pairs when the user clicks the card. It can hold an object of label and value, a list of {label, value} or plain text.{{components.kanban1.detailsField}}
densitycompact uses less padding on each card, so more cards fit.{{components.kanban1.density}}
collapsedHeightHeight in pixels that a long card is cut to, with a Show more button to open it. Leave it empty to show cards in full.{{components.kanban1.collapsedHeight}}
columnWidthWidth of each column in pixels. Leave it empty for columns of equal width that fill the board.{{components.kanban1.columnWidth}}
showCountShows the number of cards in each column's header.{{components.kanban1.showCount}}
collapsibleColumnsShows a button in each column's header that folds the column to a narrow strip.{{components.kanban1.collapsibleColumns}}
collapsedColumnsIds of the columns that are folded when the app loads.{{components.kanban1.collapsedColumns}}
allowDragLets users move cards between and within columns by dragging, or with the keyboard.{{components.kanban1.allowDrag}}
allowAddShows an Add card button at the bottom of each column. It fires On add card click, and the application adds the card.{{components.kanban1.allowAdd}}
allowDeleteShows a delete button on each card that removes it from the board.{{components.kanban1.allowDelete}}
emptyTextMessage shown in a column with no cards.{{components.kanban1.emptyText}}
badgeColorsColors for badge values, such as { High: '#dc2626' }. A value can also be {text, background} to set both colors.{{components.kanban1.badgeColors}}
updatedCardDataEvery card on the board as it is now, after the latest moves, adds, updates and deletes. Save it with a query to keep the changes.{{components.kanban1.updatedCardData}}
lastSelectedCardThe card the user selected last. It is empty when nothing is selected.{{components.kanban1.lastSelectedCard}}
lastCardMovementDetails of the last move, including cardId, card, originColumnId and destinationColumnId.{{components.kanban1.lastCardMovement}}
addCardColumnId of the column whose Add card button the user clicked last.{{components.kanban1.addCardColumn}}
lastAddedCardThe card the Add card action added last.{{components.kanban1.lastAddedCard}}
lastUpdatedCardThe card as it is after the last Update card data action.{{components.kanban1.lastUpdatedCard}}
lastRemovedCardThe card deleted last.{{components.kanban1.lastRemovedCard}}
isVisibleWhether the component is visible.{{components.kanban1.isVisible}}
isLoadingWhether the component is in its loading state.{{components.kanban1.isLoading}}
isDisabledWhether the component is disabled.{{components.kanban1.isDisabled}}

Styles​

Style
Default
Primary colorTheme: Brand primary
Text colorTheme: Primary text
Container backgroundTheme: Surface 1
Border colorTheme: Default border
Border radius—
Column backgroundTheme: Surface 2
Column border colorTheme: Weak border
Column title colorTheme: Primary text
Column count backgroundTheme: Surface 3
Column count text colorTheme: Primary text
Gap between columns—
Column radius—
Card backgroundTheme: Surface 1
Card border colorTheme: Weak border
Card title colorTheme: Primary text
Card secondary text colorTheme: Placeholder text
Progress color (else the primary)Theme: Brand primary
Card radius—
Card shadowNone
Box shadow0px 0px 0px 0px #00000040

A default that starts with Theme: follows the app's theme until the style is set to another value. See App Themes.