setTheme()
Description
Dynamically applies a new theme to the Kanban board (reinitializing it).
Usage
setTheme({
name?: string, // "material" (default) | "willow" | "willow-dark"
fonts?: boolean
}): void;
Parameters
name
- (optional) specifies the theme to apply to the Kanban board. The available options are:- "material" (default)
- "willow"
- "willow-dark"
fonts
- (optional) controls whether fonts are loaded 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: