Skip to main content
SVAR Gantt ships with three built-in themes. Each theme is a Svelte wrapper component that applies a CSS class to its subtree and defines a full set of CSS custom properties.

Built-in themes

Material

Clean, elevated look with rounded task bars and Google Material-inspired colours and typography (Roboto).

Willow

Light, flat design with subtle borders and a neutral colour palette.

WillowDark

Dark-mode variant of Willow with inverted backgrounds and adjusted contrast.

Applying a theme

Import the theme component and wrap your Gantt (and any companion components) inside it:

Fonts prop

Each theme component accepts a fonts boolean prop (defaults to true). When true, the theme loads its font stack automatically. Set it to false if you already load the fonts yourself:

CSS custom properties

Every visual detail is controlled by CSS custom properties. Override them inside your own CSS to customise individual aspects without building a new theme.

Task bar variables

Grid variables

Time scale variables

Creating a custom theme

The simplest approach is to wrap your overrides in a CSS class and apply it with a minimal Svelte component that mirrors the built-in theme pattern:
All custom properties must be set on the theme’s root CSS class (e.g. .wx-willow-theme, .wx-material-theme, .wx-willow-dark-theme) so they are properly scoped.

Cell borders

The cellBorders prop on <Gantt> controls the grid lines drawn inside the chart area:

Highlighting time cells

Pass a highlightTime callback to apply a CSS class to individual day or hour cells. This is how weekends, holidays, and non-working hours are visually distinguished.
The callback signature is:
Return a CSS class name string (or empty string for no highlight). The built-in themes already style .wx-weekend with the --wx-gantt-holiday-background colour.
You can return any custom CSS class name — not just wx-weekend. Add your own styles to target it: