setTheme()
Description
Applies a new theme to Kanban dynamically (with reinitialization)
Usage
setTheme({
name?: string, // "material" (default) | "willow" | "willow-dark"
fonts?: boolean
}): void;
Parameters
name
- (optional) a theme name to be applied to Kanban. There are 3 available themes:- "material" (default)
- "willow"
- "willow-dark"
fonts
- (optional) enables/disables fonts loading from the CDN (wxi font)
tip
To specify the initial theme, you can use the theme
property.
Example
// create Kanban
const board = new kanban.Kanban("#root", {
// initial configuration parameters
});
// set the "willow" theme
board.setTheme({ name: "willow", font: false });
Change log: The method was added in v1.6
Related articles: Stylization
Related sample: