Documentation
Customization

Customization

ELIXIR Cloud Components (ECC) provides a flexible and powerful customization system that allows you to adapt components to match your design requirements. The system is built on CSS custom properties (tokens), inspired by the excellent design patterns from shadcn/ui (opens in a new tab).

This page focuses on the global design tokens that can be used with any ECC package, be it a service package (like WES, TRS, etc.) or the design utility package.

CSS Custom Properties (Design Tokens)

All ECC components use CSS custom properties with the --ecc- prefix. You can override these in your application's CSS to customize the appearance of all components.

Available Tokens

Here are all the available design tokens you can customize:

Color Tokens

TokenDescriptionLight DefaultDark Default
--ecc-backgroundMain background coloroklch(1 0 0)oklch(0.145 0 0)
--ecc-foregroundMain text coloroklch(0.145 0 0)oklch(0.985 0 0)
--ecc-primaryPrimary brand coloroklch(0.205 0 0)oklch(0.985 0 0)
--ecc-primary-foregroundText on primary backgroundoklch(0.985 0 0)oklch(0.205 0 0)
--ecc-secondarySecondary coloroklch(0.97 0 0)oklch(0.269 0 0)
--ecc-secondary-foregroundText on secondary backgroundoklch(0.205 0 0)oklch(0.985 0 0)
--ecc-mutedMuted background coloroklch(0.97 0 0)oklch(0.269 0 0)
--ecc-muted-foregroundMuted text coloroklch(0.556 0 0)oklch(0.708 0 0)
--ecc-accentAccent coloroklch(0.97 0 0)oklch(0.269 0 0)
--ecc-accent-foregroundText on accent backgroundoklch(0.205 0 0)oklch(0.985 0 0)
--ecc-destructiveError/danger coloroklch(0.577 0.245 27.325)oklch(0.396 0.141 25.723)
--ecc-destructive-foregroundText on destructive backgroundoklch(0.985 0 0)oklch(0.637 0.237 25.331)
--ecc-borderBorder coloroklch(0.922 0 0)oklch(0.269 0 0)
--ecc-inputInput border coloroklch(0.922 0 0)oklch(0.269 0 0)
--ecc-ringFocus ring coloroklch(0.708 0 0)oklch(0.439 0 0)

Card Tokens

TokenDescriptionLight DefaultDark Default
--ecc-cardCard backgroundoklch(1 0 0)oklch(0.145 0 0)
--ecc-card-foregroundCard text coloroklch(0.145 0 0)oklch(0.985 0 0)
--ecc-popoverPopover backgroundoklch(1 0 0)oklch(0.145 0 0)
--ecc-popover-foregroundPopover text coloroklch(0.145 0 0)oklch(0.985 0 0)

Chart Colors

TokenDescriptionLight DefaultDark Default
--ecc-chart-1Chart color 1oklch(0.646 0.222 41.116)oklch(0.488 0.243 264.376)
--ecc-chart-2Chart color 2oklch(0.6 0.118 184.704)oklch(0.696 0.17 162.48)
--ecc-chart-3Chart color 3oklch(0.398 0.07 227.392)oklch(0.769 0.188 70.08)
--ecc-chart-4Chart color 4oklch(0.828 0.189 84.429)oklch(0.627 0.265 303.9)
--ecc-chart-5Chart color 5oklch(0.769 0.188 70.08)oklch(0.645 0.246 16.439)

Layout Tokens

TokenDescriptionDefault
--ecc-radiusBorder radius0.625rem

Sidebar Tokens

TokenDescriptionLight DefaultDark Default
--ecc-sidebarSidebar backgroundoklch(0.985 0 0)oklch(0.205 0 0)
--ecc-sidebar-foregroundSidebar textoklch(0.145 0 0)oklch(0.985 0 0)
--ecc-sidebar-primarySidebar primaryoklch(0.205 0 0)oklch(0.488 0.243 264.376)
--ecc-sidebar-primary-foregroundSidebar primary textoklch(0.985 0 0)oklch(0.985 0 0)
--ecc-sidebar-accentSidebar accentoklch(0.97 0 0)oklch(0.269 0 0)
--ecc-sidebar-accent-foregroundSidebar accent textoklch(0.205 0 0)oklch(0.985 0 0)
--ecc-sidebar-borderSidebar borderoklch(0.922 0 0)oklch(0.269 0 0)
--ecc-sidebar-ringSidebar focus ringoklch(0.708 0 0)oklch(0.439 0 0)

Customizing Design Tokens

To customize the appearance of ECC components, override the CSS custom properties in your application's CSS:

Basic Token Customization

:root {
  /* Change the primary color to blue */
  --ecc-primary: oklch(0.6 0.25 250);
  --ecc-primary-foreground: oklch(1 0 0);
  
  /* Customize border radius */
  --ecc-radius: 1rem;
  
  /* Update accent colors */
  --ecc-accent: oklch(0.95 0.02 250);
  --ecc-accent-foreground: oklch(0.2 0 250);
}

Theme-Specific Customization

You can also provide different values for dark mode:

:root {
  /* Light theme */
  --ecc-primary: oklch(0.4 0.25 250);
  --ecc-background: oklch(1 0 0);
}
 
.dark {
  /* Dark theme */
  --ecc-primary: oklch(0.7 0.25 250);
  --ecc-background: oklch(0.1 0 0);
}

Credits

This customization system is inspired by the excellent work of shadcn/ui (opens in a new tab), which pioneered many of the patterns we use for component architecture and theming. We've adapted their approach to work seamlessly with Web Components and the ECC ecosystem.

Elixir Cloud & AAICloud SDKElixir

Released under Apache 2.0 License.

Copyright © 2023-2025 ELIXIR