Theme
Theme and Design Tokens
Every visual decision in Hulian UI is driven by design tokens in three layers: primitives, semantics, and preset utilities. Import two CSS files to enable components, themes, and breakpoints.
Three-layer token architecture
Changes flow upward; components consume only semantic tokens and utilities.
- 01
Primitives
@hulianui/tokens/primitives.cssThe shared OKLCH palette. It does not change between light and dark themes.
- 02
Semantic tokens
@hulianui/tokens/semantic.cssPrimitive colors named by purpose. Themes replace values without changing structure, and components consume this layer.
- 03
Preset utilities
@hulianui/tokens/preset.cssThe Tailwind CSS v4 theme maps semantic tokens to utilities and declares the dark variant, breakpoints, and radii.
How to consume the tokens
Import them once in any React application.
/* app/globals.css */ @import "@hulianui/tokens/tokens.css"; /* primitives and semantic tokens */ @import "@hulianui/tokens/preset.css"; /* Tailwind CSS v4 and utilities */
Explore each token group
Semantic colors, primitive palettes, and chart colors.
Theme switching with data-theme and no visible flash.
Type sizes, font weights, and line-height ratios.
Spacing scale based on a 0.25rem unit.
Responsive breakpoints and usage guidance.
Container and control radius roles, and the corner scale.
Elevation and shadow scales.
Easing, duration, and when motion is appropriate.
Pointer semantics for interactive states.