Skip to main content

Design tokens

Arco tokens live in src/styles/tokens.css. Every shell and Arco-styled surface should reference --arco-* variables — never hardcoded hex values in new code.

Theme switching

<html data-theme="dark">
<!-- or -->
<html data-theme="light">

Installed apps receive forwarded aliases as --os-* (mapped from --arco-* in AppHost.tsx).

Categories

Typography

TokenDefault use
--arco-font-uiBody and UI text
--arco-font-monoCode, IDs, technical labels
--arco-text-xs--arco-text-xlSize scale

Spacing

TokenValue
--arco-space-2xs2px
--arco-space-xs4px
--arco-space-s8px
--arco-space-m12px
--arco-space-l16px
--arco-space-xl24px
--arco-space-2xl32px

Radii

TokenUse
--arco-radius-sChips, small controls
--arco-radius-mCards, inputs
--arco-radius-lModals, large panels
--arco-radius-windowWindow chrome

Semantic colors (dark theme example)

TokenRole
--arco-bg-desktopDesktop wallpaper area
--arco-bg-surfacePanel backgrounds
--arco-bg-elevatedRaised cards
--arco-text-primaryPrimary text
--arco-text-secondarySecondary text
--arco-accentPrimary accent
--arco-success / --arco-warning / --arco-dangerStatus colors
--arco-borderDefault borders

Motion & layers

TokenRole
--arco-easeDefault easing curve
--arco-dur-fast / --arco-dur-medTransition durations
--arco-z-windows / --arco-z-chrome / --arco-z-overlayStacking order

Rules

  1. Add missing semantics as new --arco-* tokens before using one-off values.
  2. Do not introduce parallel --os-* or .lf-* naming in new shell code.
  3. Forward tokens to installed apps; don't duplicate palettes per app.

See the token catalog for the full list.