Design Tokens

Every token in matix/ui — resolved live for the active theme. Switch the theme or appearance from the top bar to see values update.

Colors

Backgrounds, foregrounds, primary, semantic states, borders, and overlays.

Backgrounds

Surface colors for layering content.

—
Basecolors.bgBase
—
Subtlecolors.bgSubtle
—
Mutedcolors.bgMuted
—
Inversecolors.bgInverse

Foregrounds

Text and icon colors with accessible contrast.

—
Basecolors.fgBase
—
Subtlecolors.fgSubtle
—
Mutedcolors.fgMuted
—
Inversecolors.fgInverse

Primary

Primary interactive color for buttons, links, and focus rings.

—
Defaultcolors.primary
—
Foregroundcolors.onPrimary
—
Hovercolors.primaryHover
—
Activecolors.primaryActive

Semantic

Communicates status — destructive, success, warning, info.

Destructive

—
Defaultcolors.destructive
—
Foregroundcolors.onDestructive
—
Backgroundcolors.destructiveBg

Success

—
Defaultcolors.success
—
Backgroundcolors.successBg

Warning

—
Defaultcolors.warning
—
Backgroundcolors.warningBg

Info

—
Defaultcolors.info
—
Backgroundcolors.infoBg

Borders

Dividers, outlines, and focus indicators.

—
Defaultcolors.border
—
Subtlecolors.borderSubtle
—
Strongcolors.borderStrong
—
Focuscolors.borderFocus

Overlays

Backdrop scrim used behind modals and drawers.

—
Overlaycolors.overlay

Layout

Spatial primitives — spacing scale and corner radii.

Spacing

Padding, gap, and margin scale used by every component.

0—
spacing.0
0.5—
spacing.0.5
1—
spacing.1
1.5—
spacing.1.5
2—
spacing.2
2.5—
spacing.2.5
3—
spacing.3
3.5—
spacing.3.5
4—
spacing.4
5—
spacing.5
6—
spacing.6
7—
spacing.7
8—
spacing.8
9—
spacing.9
10—
spacing.10
12—
spacing.12
14—
spacing.14
16—
spacing.16
20—
spacing.20
24—
spacing.24

Radii

Border-radius scale — sm/md for controls, lg+ for surfaces.

none—
radii.none
xs—
radii.xs
sm—
radii.sm
md—
radii.md
lg—
radii.lg
xl—
radii.xl
2xl—
radii.2xl
full—
radii.full

Typography

Type scale, weights, leading, tracking, and font stacks.

Font size

Type scale — base 14px (compact UI), grows to 36px display.

Aa
xs—
fontSize.xs
Aa
sm—
fontSize.sm
Aa
base—
fontSize.base
Aa
md—
fontSize.md
Aa
lg—
fontSize.lg
Aa
xl—
fontSize.xl
Aa
2xl—
fontSize.2xl
Aa
3xl—
fontSize.3xl
Aa
4xl—
fontSize.4xl
Aa
5xl—
fontSize.5xl

Font weight

Four-step weight scale — prefer weight over size for emphasis.

Aa
normal—
fontWeight.normal
Aa
medium—
fontWeight.medium
Aa
semibold—
fontWeight.semibold
Aa
bold—
fontWeight.bold

Line height

Leading scale — tight for headings, relaxed for long-form.

The quick brown fox jumps over the lazy dog

none—
lineHeight.none

The quick brown fox jumps over the lazy dog

tight—
lineHeight.tight

The quick brown fox jumps over the lazy dog

snug—
lineHeight.snug

The quick brown fox jumps over the lazy dog

normal—
lineHeight.normal

The quick brown fox jumps over the lazy dog

relaxed—
lineHeight.relaxed

Letter spacing

Tracking — tighten large headings, loosen all-caps labels.

TRACKING
tight—
letterSpacing.tight
TRACKING
normal—
letterSpacing.normal
TRACKING
wide—
letterSpacing.wide

Font family

System UI stacks — zero font download, native OS feel.

Aa Bb 1234
sans—
fontFamily.sans
Aa Bb 1234
mono—
fontFamily.mono

Elevation

Visual depth — surfaces, shadows, and stacking order. Surface tokens drive elevated panels (Card, Dialog, Popover, Menu, Toast) and are the primary theming hook for Liquid Glass and Claymorphic looks.

Surface

Background, blur, border, and inner glow for elevated surface components.

bg—
surface.bg
bgSubtle—
surface.bgSubtle
blur—
surface.blur
borderColor—
surface.borderColor
borderWidth—
surface.borderWidth
shadow—
surface.shadow
innerGlow—
surface.innerGlow

Shadows

Elevation scale — xs for cards, xl for modals. Plus focus rings.

xs—
shadows.xs
sm—
shadows.sm
md—
shadows.md
lg—
shadows.lg
xl—
shadows.xl
ring—
shadows.ring
ringDestructive—
shadows.ringDestructive

Z-index

Stacking layers — gap of 100 between each for safe customisation.

—
base—
zIndex.base
—
raised—
zIndex.raised
—
dropdown—
zIndex.dropdown
—
sticky—
zIndex.sticky
—
overlay—
zIndex.overlay
—
modal—
zIndex.modal
—
popover—
zIndex.popover
—
tooltip—
zIndex.tooltip
—
toast—
zIndex.toast

Animation

Motion timing — durations and easing curves.

Duration

Animation durations — exits faster than enters.

instant—
motion.durationInstant
fast—
motion.durationFast
normal—
motion.durationNormal
moderate—
motion.durationModerate
slow—
motion.durationSlow
lazy—
motion.durationLazy

Easing

Timing functions — enter, exit, spring, iOS-style drawer.

Enter—
motion.easingEnter
Exit—
motion.easingExit
Default—
motion.easingDefault
Spring—
motion.easingSpring
IOS—
motion.easingIOS