Skip to content
RefineUI

Design tokens

Semantic variables that power RefineUI — color, type, space, motion, and stacking.

Tokens are the single source for visual values. @refineui/tokens maps Foundation scales to CSS variables and Tailwind utilities. Components and product UI should reference semantic names, not palette hex or raw px.

CategoryUse for
ColorSurfaces, text, borders, brand, status
TypographyText roles (headingMd, bodyMd, …)
SpacingGaps, padding, margins
SizingControl heights, icons, layout steps
RadiusCorner radii
BorderStroke widths
ElevationShadows / depth
OpacityDisabled wash, overlay helpers
MotionDuration, easing, press scale
Z-indexOverlay stacking
  1. Prefer semantic aliases (backgroundSurface, sizeMedium, fast) over Foundation primitives in product code.
  2. If a value is missing, update Foundation first, then packages/tokens — do not invent a one-off.
  3. Import @refineui/react/refineui.css once so control hover / focus motion stays consistent.