Skip to content

Design Language

Design Language

A systematic approach to visual design, built on a three-tier token architecture that enables consistent theming, dark mode, and density scaling across every component.

Tessera UI’s design system is built on a strict token hierarchy. Each tier serves a specific purpose, creating a clear path from raw values to themed component styles.

1
Tier 1
Reference Tokens
Raw palette values. Immutable across themes. Never used directly by components.
—ts-ref-primary-600: #1a73e8
2
Tier 2
Semantic Tokens
Purpose-driven aliases to reference tokens. These are what components consume. Remapped in dark mode.
—ts-color-interactive-primary: var(—ts-ref-primary-600)
3
Tier 3
Component Tokens
Per-component overrides defined on :host. Consumers can customize individual component styles.
—ts-button-bg: var(—ts-color-interactive-primary)

This separation means:

  • Themes only need to remap semantic tokens (Tier 2). Reference tokens stay fixed.
  • Customization can happen at any level — override a reference token to change the entire palette, a semantic token to adjust one role, or a component token for surgical precision.
  • Dark mode remaps semantic tokens via [data-theme="dark"]. No component CSS changes are needed.

Explore each foundation of the design system in depth.


Tessera UI uses data-* HTML attributes for global configuration — no JavaScript config objects required.

AttributeValuesPurpose
data-themelight (default), dark, high-contrastTheme selection
data-densitycomfortable (default), compact, spaciousSpacing density
data-iconslucide (default)Icon set selection
dirltr (default), rtlText direction
<!-- Example: dark theme with compact density -->
<html data-theme="dark" data-density="compact">
<body>
<ts-button variant="filled">Save Changes</ts-button>
</body>
</html>