Skip to main content

API overview

Kanban constructor#

new kanban.Kanban("#root", {    // configuration parameters});

Parameters:

  • an HTML container (the ID of the HTML container)
  • an object of the configuration parameters (check here)

Toolbar constructor#

new kanban.Toolbar("#toolbar", {    // configuration parameters});

Parameters:

  • an HTML container (the ID of the HTML container)
  • an object of the configuration parameters (check here)

Kanban methods#

NameDescription
addCard()adds a new card into Kanban
addColumn()adds a new column into Kanban
addRow()adds a new row into Kanban
deleteCard()removes a card from Kanban
deleteColumn()removes a column from Kanban
deleteRow()removes a row from Kanban
destructor()removes Kanban
getAreaCards()gets an array of the data objects of the cards
getCard()gets the data object of the card by the specified ID
getSelection()gets an array of IDs of the selected cards
moveCard()moves a card to the specified column (and row)
parse()loads data into Kanban
selectCard()selects a card by the specified ID
serialize()serializes the widget data to JSON
setConfig()sets the config parameters
setLocale()sets a new locale
setSearch()looks for the needed cards by the specified parameters
unselectCard()unselects the card(s) by the specified ID
updateCard()updates the card data by the specified ID
updateColumn()updates the column data by the specified ID
updateRow()updates the row data by the specified ID

Kanban internal API#

Event Bus methods#

NameDescription
api.exec()allows triggering the inner events
api.intercept()allows intercepting and preventing the inner events
api.on()allows attaching a handler to the inner events
api.setNext()allows adding some action into the Event Bus order

State methods#

NameDescription
api.getReactiveState()gets an object with the reactive properties of the StateStore
api.getState()gets an object with the current properties of the StateStore
api.getStores()gets an object with the StateStore and DataStore objects

RestDataProvider methods#

NameDescription
getCards()gets a promise with the cards data
getColumns()gets a promise with the columns data
getRows()gets a promise with the rows data

Kanban properties#

NameDescription
cardsan array of objects containing the cards data
cardShapecard settings that manage the appearance of the board
cardTemplatereturns and applies a new HTML template of the cards
columnKeydefines belonging the card to the column
columnsan array of objects containing the columns data
editorAutoSaveenables/disables an autosave mode of Kanban
editorShapeeditor settings that manage the appearance of the editor
readonlyenables/disables readonly mode of Kanban
rowKeydefines belonging the card to the row
rowsan array of objects containing the rows data
(Toolbar) apian object with internal api of Kanban
(Toolbar) itemsan array of controls located in the toolbar