Theming
var-ui themes are TypeStyles surfaces: semantic CSS custom properties, readable
public class names (plus data-* variant attrs), and cascade layers. Switch
light and dark from the header to see tokens respond.
How to customize (pick the right layer)
createDesignThemewithcomponents— primary path for recipe restyles. Mint custom mode-aware tokens and restyle any recipe with full CSS and typed variant names. No class names in your theme code.- Component CSS variables — cheapest single-property tweak when a recipe
already exposes a
c.vars()hook (e.g.--var-ui-button-background). - Public classes /
styles.scope()— escape hatch for nested conflicting themes (@scope) or one-off CSS outside the theme config.
See Customize for the full story, Themes for authoring and applying a theme, and Design tokens for the built-in token map.
Topics
Typed theme overrides and custom tokens — the primary customization path.
ThemesCreate and apply custom var-ui themes with createDesignTheme.
Design tokensSemantic tokens that power var-ui components and layouts.
CSS variablesTheme and style var-ui with CSS custom properties — design tokens and component variables.
Plain CSSRestyle var-ui components with a normal stylesheet — class names, data attributes, component…
ColorsPrimitive palette ramps and semantic color tokens in var-ui.
ShadowsBox-shadow tokens in var-ui.