Styling across all the Devie UI components is using a unified list of carefully crafted CSS variables.
Following the Installation guide, you should have already defined the default variables in your project.
Once the default theme is set up, you can modify values based on your preferences.
You can edit the values directly; however, a cleaner approach is to overwrite them without changing the original, allowing you to keep track of your customizations. Here are different examples of overwrites.
The Default theme is already set up in your project. No CSS overrides are needed - it uses the base CSS variables defined in your globals.scss or default.css file.
@layer devie {
// Defaults
}This approach to theming can be leveraged to implement dark mode, or even manage multiple themes.
Here is the list of all the variables used by Devie UI.
We prefer variables to serve a functional role as design tokens (e.g. "color-text") rather than hue values typically used in other libraries (e.g. "blue-500").
| Token | Description | Current |
|---|---|---|
| --devie__color__text | Main text color. | - |
| --devie__color__text-sub | Sub-text color. | - |
| --devie__color__background | Main background color. | - |
| --devie__color__background-sub | Secondary background color for contrast areas. | - |
| --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 for body text. | - |
| --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 | Default font family with fallbacks. | - |
| Token | Description | Current |
|---|---|---|
| --devie__radius | Default border radius for elements. | - |
| --devie__radius-strong | Larger border radius for emphasis. | - |
Independent color tokens for charts, tags, folders, and other UI elements that need distinct color identities.
| Token | Description | Current |
|---|---|---|
| --devie__color__litteral-gray | Gray color for charts, tags, and folders. | - |
| --devie__color__litteral-brown | Brown color for charts, tags, and folders. | - |
| --devie__color__litteral-orange | Orange color for charts, tags, and folders. | - |
| --devie__color__litteral-yellow | Yellow color for charts, tags, and folders. | - |
| --devie__color__litteral-green | Green color for charts, tags, and folders. | - |
| --devie__color__litteral-blue | Blue color for charts, tags, and folders. | - |
| --devie__color__litteral-purple | Purple color for charts, tags, and folders. | - |
| --devie__color__litteral-pink | Pink color for charts, tags, and folders. | - |
| --devie__color__litteral-red | Red color for charts, tags, and folders. | - |