EVO React Components

Theming

Using CSS Variables for theming in the EVO Design System

OverviewDocs
The EVO Design System uses CSS variables for theming, providing a flexible and maintainable approach to customization
Installation
Installing the EVO Design System theme

To install the theme run:

Install EVO theme:
npx shadcn add https://registry.eds.access-evo.com/eds-style.json
Font
Referencing the EVO Design System font

In order to properly render the font, you need to include the following CSS at the top of your globals.css (nextjs) or index.css (vite) file:

Import EVO font:
@import url('https://fonts.googleapis.com/css2?family=Inter:[email protected]');
Dark ModeGuide
Implementing dark mode in your application

To implement dark mode in your application, follow the comprehensive guide provided by shadcn/ui. The guide covers theme configuration, component styling, and best practices for creating a seamless dark mode experience.

CSS Variables
Using CSS variables for theming

To use CSS variables for theming set tailwind.cssVariables to true in your components.json file.

Example usage:
<div className="bg-background text-foreground" />
components.json
{
  "style": "default",
  "rsc": true,
  "tailwind": {
    "config": "",
    "css": "app/globals.css",
    "baseColor": "neutral",
    "cssVariables": true
  },
  "aliases": {
    "components": "@/components",
    "utils": "@/lib/utils",
    "ui": "@/components/ui",
    "lib": "@/lib",
    "hooks": "@/hooks"
  },
  "iconLibrary": "lucide"
}
Convention
Background and foreground color naming convention

We use a simple background and foreground convention for colors. The background variable is used for the background color of the component and the foreground variable is used for the text color.

The background suffix is omitted when the variable is used for the background color of the component.

Given the following CSS variables:
--primary: oklch(0.5030 0.0859 194.7689);
--primary-foreground: oklch(1.0000 0 0);

The background color of the following component will be var(--primary) and the foreground color will be var(--primary-foreground).

<div className="bg-primary text-primary-foreground">Hello</div>
List of Variables
EVO Design System CSS variables available for customization

The list of variables available for customization in the EVO Design System can be found at:

This JSON file contains all available CSS variables including colors, typography, spacing, and theme configurations for both light and dark modes.

Other Color Formats
Additional information about color usage

See the Tailwind CSS documentation for more information on using colors in Tailwind CSS.