Documentation
Customization

Customizing

This documentation explains how to customize the suite of ELIXIR Cloud Components (ECC) to suit your specific requirements. This allows you to modify the appearance, behavior, and functionality of the components to better align with your application's design and user experience. You can customize all the components from here.

Architecture

The ELIXIR Cloud Components (ECC) suite employs a robust and flexible customization architecture that allows for easy theming and adaptation to various design requirements. This system is built on a hierarchy of design tokens, ranging from high-level, user-configurable options to low-level CSS variables that directly affect the component styles.

Token Hierarchy

  • High-Level Tokens (Adaptive UI): These are the primary customization points for users. They represent broad design concepts and are easy to understand and modify.
  • Low-Level Tokens (CSS): These are derived from the high-level tokens and provide more granular control over the component styles. They are implemented as CSS custom properties (variables).

Customization Flow

  • Users modify high-level tokens to match their design requirements.
  • The ECC system automatically recalculates all affected low-level tokens.
  • Components instantly reflect the changes, updating their appearance accordingly.

Design Tokens

User can modify the appearance of ECC components by changing the following tokens.

High-Level Tokens

High-level tokens are the primary customization points for users. They represent broad design concepts and are easy to understand and modify. The following table lists all the available high-level tokens:

Token NameDescriptionDefault Value
--ecc-color-brandThe primary brand colorhsl(217, 91%, 60%)
--ecc-color-warningColor used for warning stateshsl(38, 92%, 50%)
--ecc-color-dangerColor used for error or danger stateshsl(0, 84%, 60%)
--ecc-color-successColor used for success stateshsl(142, 71%, 45%)
--ecc-color-neutralBase color for neutral shadeshsl(240, 4%, 46%)
--ecc-cornerBase value for border radius0.5rem
--ecc-depthIntensity of shadows and depth effects1
--ecc-densityBase value for spacing and layout density0.5rem
--ecc-sizingBase value for component sizing0.9rem
--ecc-motionDuration for animations and transitions250ms
--ecc-font-sizeBase font size0.9rem

Low-Level Tokens

Low-level tokens are derived from the high-level tokens and provide more granular control over the component styles. Users can modify these tokens to achieve fine-grained customization of the components.

For a comprehensive list of all low-level tokens, please refer to the Primitive Stylesheet (opens in a new tab).

Customizing Tokens

To customize the appearance of ECC components, you can modify the tokens in your application's CSS.

Here's an example of how to customize the brand color:

:root {
  --ecc-color-brand: hsl(280, 80%, 50%); /* Change to a purple hue */
}

This change will affect all components and styles that use the brand color, providing a consistent update across your application.

OR for the more granular control, you can modify the low-level tokens directly:

:root {
    --ecc-color-primary-50: hsl(280, 80%, 50%); /* Change the primary color to a purple hue */
}
Elixir Cloud & AAICloud SDKElixir

Released under Apache 2.0 License.

Copyright © 2023-2024 ELIXIR