All Devie UI components share a unified set of design tokens defined in global CSS variables. This minimalist approach allows consistency and easy personalization.
The Installation guide defines the default variables in your project.
You can edit the default theme values directly, but a good approach is to keep the defaults and overwrite only the values you need.
Here are some examples of themes:
This site uses the default theme defined in the installation, with no overrides.
Use the same approach to implement dark mode, or even manage multiple themes.
We prefer variables with a functional role, such as "color-text", over the hue values found in other libraries, such as "blue-500".
| Token | Description | Current |
|---|---|---|
| --devie__color__text | Main text color. | - |
| --devie__color__text-sub | Sub-text color. | - |
| --devie__color__background | The page. The default surface level. | - |
| --devie__color__background-sunken | A recessed area below the page: a well, a track, a shell. | - |
| --devie__color__background-raised | A layer above the page. It pairs with the menu shadow. | - |
| --devie__color__line | Color for borders and dividers. | - |
| --devie__color__primary | Primary brand color for buttons and interactive elements. | - |
| --devie__color__primary-label | Text color compatible with primary color. | - |
| --devie__color__success | Color for success states and confirmations. | - |
| --devie__color__success-label | Text color compatible with success color. | - |
| --devie__color__warning | Color for warning states and cautionary actions. | - |
| --devie__color__warning-label | Text color compatible with warning color. | - |
| --devie__color__danger | Color for error states and destructive actions. | - |
| --devie__color__danger-label | Text color compatible with danger color. | - |
| Token | Description | Current |
|---|---|---|
| --devie__font-size__normal | Standard font size. | - |
| --devie__font-size__small | Font size for small text elements like captions. | - |
| --devie__font-size__title1 | Font size for primary headings. | - |
| --devie__font-size__title2 | Font size for secondary headings. | - |
| --devie__font-size__title3 | Font size for tertiary headings. | - |
| --devie__font-family | System font stack by default. To use a web font, load it and list it first. | - |
| Token | Description | Current |
|---|---|---|
| --devie__radius | Default border radius for elements. | - |
| --devie__radius-strong | Larger border radius for emphasis. | - |
| Token | Description | Current |
|---|---|---|
| --devie__shadow__menu | Default shadow for menus. | - |
| --devie__shadow__control | Elevation for fields and secondary buttons. | - |
Use spacing tokens for padding, gaps, margins, and line heights, so every element lands on the 8px grid.
| Token | Description | Current |
|---|---|---|
| --devie__spacing__x05 | Half step of the 8px grid. | - |
| --devie__spacing__x1 | One spacing unit, the base of the 8px grid. | - |
| --devie__spacing__x2 | Two spacing units. | - |
| --devie__spacing__x3 | Three spacing units. | - |
| --devie__spacing__x4 | Four spacing units. | - |
| --devie__spacing__x5 | Five spacing units. | - |
| --devie__spacing__x6 | Six spacing units. | - |
| --devie__spacing__x7 | Seven spacing units. | - |
| --devie__spacing__x8 | Eight spacing units. | - |
The zoom scales the interface; see Scale the interface.
| Token | Description | Current |
|---|---|---|
| --devie__zoom | The interface zoom factor, 1 at native scale. Applied to the app root and to the popups. | - |
Use literal color tokens for charts, tags, folders, and other elements that need a specific color identity. The user expects the named color, regardless of the theme.
| Token | Description | Current |
|---|---|---|
| --devie__color__literal-gray | Literal Gray color. | - |
| --devie__color__literal-brown | Literal Brown color. | - |
| --devie__color__literal-orange | Literal Orange color. | - |
| --devie__color__literal-yellow | Literal Yellow color. | - |
| --devie__color__literal-green | Literal Green color. | - |
| --devie__color__literal-blue | Literal Blue color. | - |
| --devie__color__literal-purple | Literal Purple color. | - |
| --devie__color__literal-pink | Literal Pink color. | - |
| --devie__color__literal-red | Literal Red color. | - |
Devie UI derives hover and disabled state colors with the devie-hover-color() and devie-disabled-color() helper functions.
The hover function darkens colors slightly. The disabled function blends colors towards a target lightness and reduces saturation, making both dark text and bright backgrounds appear appropriately muted.
| Token | Description | Current |
|---|---|---|
| --devie__effect__hover-intensity | Hover darkening intensity. | - |
| --devie__effect__disabled-intensity | Blend intensity towards the disabled target lightness. | - |
| --devie__effect__disabled-desaturate | Disabled saturation multiplier. | - |
| --devie__effect__disabled-target-l | Target lightness (OKLCH L value) for disabled state blending. | - |
| --devie__effect__backdrop-opacity | Opacity of the backdrop behind modal popups. | - |
To set your own hover and disabled states, change these functions in your components.