Skip to main content

setTheme()

Description

Allows you to change the Kanban theme on the fly (reinitializes the component).

Usage

setTheme({
name?: string, // "material" (default) | "willow" | "willow-dark"
fonts?: boolean
}): void;

Parameters

  • name - (optional) the theme to apply to the Kanban board. There are three themes available:
    • "material" (default)
    • "willow"
    • "willow-dark"
  • fonts - (optional) toggles loading of fonts from the CDN (wxi font).
tip

You can set the initial theme using the theme property.

Example

// create Kanban
const board = new kanban.Kanban("#root", {
// initial configuration parameters
});
// apply the "willow" theme
board.setTheme({ name: "willow", font: false });

Change log: This method was introduced in v1.6

Related articles: Stylization

Related sample: Kanban. Changing a theme via the CSS class