Skip to main content

addColumn()

Description

Inserts a new column into the Kanban board

Usage

addColumn({
id?: string | number,
column?: object,
before?: string | number
}): void;

Parameters

  • id - (optional) specifies the ID for the new column
  • column - (optional) provides the data object that defines the new column
  • before - (optional) indicates the ID of the column before which the new one will be inserted
info

You can find the complete list of column parameters here

Example

// create Kanban
const board = new kanban.Kanban("#root", {
columns,
cards
});
// add new column
board.addColumn({
id: "extra_column",
column: {
label: "Extra column",
limit: 2,
strictLimit: 2,
collapsed: true
},
before: "column_2"
});

Change log: The id, column, and before parameters were introduced in v1.1