Skip to content

Design Tokens

All component styles consume var(--lx-*) tokens exclusively. Your app code should too — it re-themes automatically.

Import: @luxeanor/ui/styles/tokens.css. Two kinds: static tokens (shared by all themes) and semantic tokens (vary with data-theme × data-mode).

Static tokens

Typography

TokenValuePurpose
--lx-font-family"Inter", ui-sans-serif, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serifbody font stack
--lx-font-display"Inter", ui-sans-serif, -apple-system, "PingFang SC", sans-serifdisplay font stack
--lx-text-xs12pxauxiliary text
--lx-text-sm13pxsecondary text
--lx-text-md14pxbody default
--lx-text-lg16pxemphasized body
--lx-text-xl18pxsmall headings
--lx-text-2xl24pxheadings

Spacing / radius / z-index

TokenValuePurpose
--lx-space-1--lx-space-84 / 8 / 12 / 16 / 20 / 24 / 32pxspacing ladder (steps 1,2,3,4,5,6,8)
--lx-radius-sm8pxsmall radius (inputs)
--lx-radius-md12pxmedium radius (buttons/cards)
--lx-radius-lg16pxlarge radius (panels)
--lx-radius-xl24pxextra large (feature cards)
--lx-radius-full999pxpills
--lx-z-dropdown / modal / toast / popover / confirm1000 / 1100 / 1200 / 1300 / 1400overlay z-index ladder

Motion

TokenValuePurpose
--lx-dur180msstandard transition
--lx-dur-slow400msslow transition
--lx-dur-entrance800msentrance animation
--lx-easecubic-bezier(.16,1,.3,1)standard easing
--lx-ease-springcubic-bezier(.34,1.56,.64,1)spring easing

Semantic tokens

Values below are examples from the default theme (amethyst × light); the full values of all 8 combinations live in the package's styles/tokens.css.

Primary series (varies with data-theme family)

TokenDefaultPurpose
--lx-primary#6200EEprimary
--lx-primary-hover / -active#7A2BFF / #4A00B1interaction states
--lx-primary-softrgba(98,0,238,.08)soft primary background
--lx-primary-container / --lx-on-primary-container#E8DDFF / #22005Dcontainer / on-container (M3)
--lx-grad-goldprimary gradientbrand gradient (legacy name; all families provide it)
--lx-grad-metalmetal gradientmetal-text effect
--lx-glow-gold / -strongprimary glowglow shadows
--lx-ring0 0 0 3px rgba(...,.18)focus ring

Neutral scales (vary with data-mode)

TokenDefaultPurpose
--lx-bg#FEF7FFpage background
--lx-bg-low / -muted / -hover / -high#F8F2F9 / #F2ECF3 / #ECE6ED / #E6E1E8surface ladder (low → high)
--lx-bg-raised#FFFFFFraised surfaces (cards/overlays)
--lx-surface / --lx-surface-muted= raised / mutedsemantic aliases
--lx-glass-bg / --lx-glass-borderrgba(255,255,255,.72) / rgba(31,30,27,.10)glass layer
--lx-text / -secondary / -muted / -invert#1D1B20 / #494456 / #6E6880 / #FFFFFFtext ladder
--lx-border / --lx-border-strong#CBC3D9 / #7A7488borders
--lx-hairline / --lx-hairline-litrgba(31,30,27,.08 / .14)hairlines (lit / unlit)
--lx-shadow-sm / -md / -lgthree levelselevation shadows
--lx-light-topinset 0 1px 0 rgba(255,255,255,.6)top light
--lx-overlayrgba(29,26,19,.32)overlay scrim

Status colors

TokenDefault (light)Purpose
--lx-success / --lx-success-soft#2E7D46 / #DEEDD5success
--lx-warning / --lx-warning-soft#A96A00 / #FFE3BBwarning
--lx-danger / --lx-danger-soft#BA1A1A / #F9DEDCdanger
--lx-info / --lx-info-soft#2563EB / #DFE8F6info
--lx-accent / --lx-accent-soft#6553E0 / rgba(101,83,224,.10)accent

Access from TS

ts
import { tokens, staticTokens, modeTokens, familyTokens, THEME_FAMILIES } from '@luxeanor/ui'

The token objects are kept literally in sync with the CSS (enforced by tests) — handy for canvas/chart scenarios where CSS variables can't reach.