Skip to content
HELiX

Token Reference

apps/docs/src/content/docs/design-tokens/reference Click to copy
Copied! apps/docs/src/content/docs/design-tokens/reference

HELiX ships ~464 design token leaves across 30 categories (light mode, dark mode, high contrast, plus container, focus, transition, etc.). All tokens use the --hx- prefix. Light-mode token sheets are adopted on :root via document.adoptedStyleSheets; dark and high-contrast overrides are applied through scoped adopted stylesheets (driven by hx-theme or the prefers-color-scheme / forced-colors media queries) rather than written to :root directly.

This reference is an overview, not an exhaustive list — the source of truth is{’ ’} packages/hx-tokens/src/tokens.json. The categories below cover the most commonly consumed surface; container widths, component-prefixed tokens, easing, opacity, transform, and aspect-ratio tokens also exist and are documented in the source.

Eight color ramps with 11 shades each (50–950), plus neutral with shade 0 (white). On top of the ramps, the color subtree exposes semantic surfaces (surface, border, text, action, focus-ring, selection, accent) and ramp-shorthand text tokens (error-text, success-text).

RampUsage
--hx-color-primary-*Primary brand actions, links, focus rings
--hx-color-secondary-*Secondary actions, accents
--hx-color-accent-*Decorative highlights
--hx-color-neutral-*Backgrounds, borders, text
--hx-color-success-*Success states, confirmations
--hx-color-warning-*Warning states, caution indicators
--hx-color-error-*Error states, destructive actions
--hx-color-info-*Informational states

Use these for text content. Both tokens are AAA-strict (1.4.6, ≥7:1) on light surfaces.

TokenResolves toUsage
--hx-color-error-texterror-700 (#A21312, 7.96:1 on white)Error message text
--hx-color-success-textsuccess-800 (#0B4D23, 10.00:1 on white)Success message text

There is no --hx-color-warning-text token in the current source. For warning text, render against the surface.warning callout backgrounds and use --hx-color-text-primary (or the appropriate text.on-warning token from the on-color set).

Run node scripts/token-contrast-audit.js to verify contrast compliance against the live token values.

--hx-space-0 0
--hx-space-px 1px
--hx-space-0-5 0.125rem
--hx-space-1 0.25rem
--hx-space-1-5 0.375rem
--hx-space-2 0.5rem
--hx-space-3 0.75rem
--hx-space-4 1rem
--hx-space-5 1.25rem
--hx-space-6 1.5rem
--hx-space-7 1.75rem
--hx-space-8 2rem
--hx-space-10 2.5rem
--hx-space-12 3rem
--hx-space-14 3.5rem
--hx-space-16 4rem
--hx-space-20 5rem
--hx-space-24 6rem
--hx-space-32 8rem
--hx-space-40 10rem
--hx-space-48 12rem
--hx-space-64 16rem
TokenValue
--hx-font-family-sansInter, system stack
--hx-font-family-monoJetBrains Mono, monospace stack
TokenValue
--hx-font-size-xs0.75rem
--hx-font-size-sm0.875rem
--hx-font-size-md1rem
--hx-font-size-lg1.125rem
--hx-font-size-xl1.25rem
--hx-font-size-2xl1.5rem
--hx-font-size-3xl1.875rem
--hx-font-size-4xl2.25rem
TokenValue
--hx-font-weight-light300
--hx-font-weight-normal400
--hx-font-weight-medium500
--hx-font-weight-semibold600
--hx-font-weight-bold700
TokenValueUsage
--hx-border-width-thin1pxStandard borders
--hx-border-width-medium2pxEmphasis borders
--hx-border-width-thick3pxHeavy borders
--hx-border-radius-none0Square corners
--hx-border-radius-sm0.25remSubtle rounding
--hx-border-radius-md0.375remStandard rounding
--hx-border-radius-lg0.5remCard rounding
--hx-border-radius-xl0.75remLarge card rounding
--hx-border-radius-2xl1remModal rounding
--hx-border-radius-full9999pxPill/circle
TokenUsage
--hx-shadow-noneNo shadow
--hx-shadow-smCards, inputs
--hx-shadow-mdDropdowns, menus
--hx-shadow-lgModals, drawers
--hx-shadow-xlElevated panels
--hx-shadow-2xlMaximum elevation
--hx-shadow-innerInset shadow
TokenValueUsage
--hx-focus-ring-width2pxFocus ring thickness
--hx-focus-ring-offset2pxGap between element and ring
--hx-focus-ring-colorprimary-500Focus ring color
TokenValueUsage
--hx-touch-target-min2.75remMinimum interactive element size (WCAG 2.5.5 minimum, 2.5.5 enhanced for AAA)
--hx-touch-target-size44pxExplicit 44px target size — WCAG 2.5.5 Target Size (Enhanced, AAA)
TokenValue
--hx-transition-base150ms ease
--hx-transition-fast150ms ease
--hx-transition-normal250ms ease
--hx-transition-slow350ms ease
TokenValueUsage
--hx-z-index-base0Default layer
--hx-z-index-dropdown1000Dropdowns, menus
--hx-z-index-sticky1100Sticky headers
--hx-z-index-fixed1200Fixed elements
--hx-z-index-backdrop1300Dialog / drawer backdrop
--hx-z-index-modal1400Modals, dialogs, drawers
--hx-z-index-popover1500Popovers
--hx-z-index-tooltip1600Tooltips
--hx-z-index-toast1700Toast notifications
TokenValue
--hx-opacity-00
--hx-opacity-50.05
--hx-opacity-100.1
--hx-opacity-250.25
--hx-opacity-500.5
--hx-opacity-750.75
--hx-opacity-900.9
--hx-opacity-1001
--hx-opacity-disabled0.5
TokenValue
--hx-breakpoint-sm640px
--hx-breakpoint-md768px
--hx-breakpoint-lg1024px
--hx-breakpoint-xl1280px
--hx-breakpoint-2xl1536px

HELiX ships 42 dark-mode token overrides and 74 high-contrast (forced-colors) overrides in tokens.json. Mode overrides are delivered via scoped adopted stylesheets — hx-theme toggles the scope explicitly, and the package also reacts to prefers-color-scheme and forced-colors media queries when consumer markup opts in.

See the Theming guide for dark mode and forced-colors configuration.