Devie UI
Version: 2026-02-14

Styling for all Devie UI components utilizes a unified set of design tokens defined in global CSS variables. This is a minimalist approach that meets the following requirements:

  • It ensures design consistency across the components.
  • It provides a centralized way to edit the theme to match your style.

Following the Installation guide, you should have already defined the default variables in your project.

Customizing Theme

Once the default theme is set up, you can modify values based on your preferences.

You can edit the values directly, or keep the defaults and overwrite only the values you need. Here are different examples of overwrites.

This site uses the default theme defined in the installation, with a custom font.

globals.css
@layer devie {
  :root {
    --devie__font-family: "Work Sans", -apple-system, Arial;
  }
}

This approach to theming can be leveraged to implement dark mode, or even manage multiple themes.

Can I edit a specific component without modifying the theme? Of course. The code is yours. Each component has its own stylesheet, allowing you to change any CSS property definition to a different variable, a hardcoded value, or even create new variables of your own.

List of All Variables

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").

Color Tokens

TokenDescriptionCurrent
--devie__color__textMain text color.
-
--devie__color__text-subSub-text color.
-
--devie__color__backgroundMain background color.
-
--devie__color__background-subSecondary background color for contrast areas.
-
--devie__color__lineColor for borders and dividers.
-
--devie__color__primaryPrimary brand color for buttons and interactive elements.
-
--devie__color__primary-labelText color compatible with primary color.
-
--devie__color__successColor for success states and confirmations.
-
--devie__color__success-labelText color compatible with success color.
-
--devie__color__warningColor for warning states and cautionary actions.
-
--devie__color__warning-labelText color compatible with warning color.
-
--devie__color__dangerColor for error states and destructive actions.
-
--devie__color__danger-labelText color compatible with danger color.
-

Font Tokens

TokenDescriptionCurrent
--devie__font-size__normalStandard font size.
-
--devie__font-size__smallFont size for small text elements like captions.
-
--devie__font-size__title1Font size for primary headings.
-
--devie__font-size__title2Font size for secondary headings.
-
--devie__font-size__title3Font size for tertiary headings.
-
--devie__font-familyDefault font family with fallbacks. Make sure you have the font imported.
-
Tip: If you can, combine font-size with line-height values that lets you match a spacing unit. This is what this site does to have the text blocks match multipliers of 8px.

Radius Tokens

TokenDescriptionCurrent
--devie__radiusDefault border radius for elements.
-
--devie__radius-strongLarger border radius for emphasis.
-

Shadow Tokens

TokenDescriptionCurrent
--devie__shadow__menuDefault shadow for menus.
-

Literal Color Tokens

Literal color tokens are used for charts, tags, folders, and other UI elements that require a specific color identity. This means the color is explicitly named and expected by the user, regardless of the theme.

TokenDescriptionCurrent
--devie__color__literal-grayLiteral Gray color.
-
--devie__color__literal-brownLiteral Brown color.
-
--devie__color__literal-orangeLiteral Orange color.
-
--devie__color__literal-yellowLiteral Yellow color.
-
--devie__color__literal-greenLiteral Green color.
-
--devie__color__literal-blueLiteral Blue color.
-
--devie__color__literal-purpleLiteral Purple color.
-
--devie__color__literal-pinkLiteral Pink color.
-
--devie__color__literal-redLiteral Red color.
-

Effect Tokens

For simplicity, the Devie UI design determines appropriate hover and disabled state colors using helper functions (devie-hover-color() and devie-disabled-color()).

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.

TokenDescriptionCurrent
--devie__effect__hover-intensityHover darkening intensity.
-
--devie__effect__disabled-intensityBlend intensity towards the disabled target lightness.
-
--devie__effect__disabled-desaturateDisabled saturation multiplier.
-
--devie__effect__disabled-target-lTarget lightness (OKLCH L value) for disabled state blending.
-

If needed, you can also modify this behavior in your components to set your own hover and disabled states. These serve as good defaults.