Guide

Theming

Weini UI combines a blue action color, quiet neutral surfaces, compact geometry, and restrained depth. Components consume the same semantic variables in every product.

For control sizes, spacing, and interaction patterns, explore design foundations.

Core palette

Compare the same semantic tokens in both color modes. These previews stay visible when you switch the site theme.

Light mode

Primary action

--primary

Active surface

--accent

Card

--card

Secondary

--secondary

Muted

--muted

Success

--success

Warning

--warning

Destructive

--destructive

Dark mode

Primary action

--primary

Active surface

--accent

Card

--card

Secondary

--secondary

Muted

--muted

Success

--success

Warning

--warning

Destructive

--destructive

Override the system

app.css
:root {
  --primary: oklch(0.54 0.18 150);
  --primary-foreground: oklch(1 0 0);
  --primary-hover: oklch(0.5 0.18 150);
  --accent: oklch(0.95 0.04 150);
  --accent-foreground: oklch(0.35 0.1 150);
  --radius: 0.5rem;
}

.dark {
  --primary: oklch(0.7 0.14 150);
  --primary-foreground: oklch(0.15 0.02 150);
  --primary-hover: oklch(0.75 0.13 150);
}

Set complete CSS colors such as oklch(...). Add .dark to the document or a subtree for dark mode. Foreground pairs should change with their surfaces.

Common tokens

TokenControls
--background / --foregroundPage canvas and text
--primary / --primary-foreground / --primary-hoverMain actions and contrast-safe hover states
--card / --popoverSurfaces
--border / --ringSurface edges, control boundaries, rules, and focus
--radiusCompact corner scale
--type-sans / --type-displayInterface and display typography
--motion-durationShort transitions
Weini UIDesign system · Vue component library · Free and public