Project docsneobrutal-ui

Design tokens

The color, type, border, radius, and shadow variables shared by every component.

On this page5 sectionsBack to top

The base registry item defines the visual contract used by every component. Tokens are plain CSS variables, so they can be changed without replacing component source.

#Core colors

TokenPurpose
--backgroundPage and canvas background
--secondary-backgroundInputs, panels, and contrasting surfaces
--foregroundDefault text and icon color
--mainPrimary accent and selected state
--main-foregroundContent and current-item indicators on the main accent
--borderStructural outlines and hard-shadow color
--inputEmpty checkbox boundaries on secondary surfaces

Keep structural borders separate from controls and state indicators. An unchecked Checkbox uses --input; Command and Select use --main-foreground for the current item on a --main surface. Custom palettes must keep these indicators at least 3:1 against their adjacent backgrounds in both modes. Changing --border globally is not necessary to make these states visible.

#Shape and depth

  • --radius controls the shared component corner radius; the --radius-* theme tokens derive from it.
  • --box-shadow-x and --box-shadow-y control hard-shadow direction and depth.
  • --shadow combines those values into the standard raised surface shadow.
  • Pressed controls translate by the shadow distance and reduce the shadow to its final edge.
  • --base-font-weight and --heading-font-weight control body and heading weight. The --font-weight-base and --font-weight-heading theme tokens map to these variables for the font-base and font-heading utilities; customize the original variables.

#Extended tokens

The base item also defines chart colors, sidebar colors, destructive states, focus rings, and light and dark theme values. Components consume semantic names instead of hard-coded palette values.

--ring controls the keyboard focus indicator. --error controls error-message text on page and panel surfaces; it is separate from the filled-action --destructive color and its --destructive-foreground content color. The text-error utility uses the shared error token.

Installed templates inherit these tokens. Documentation template previews use explicitly labeled gallery presets that are not included in the installed source.

#Customize

Use the Styling tool to change the palette, radius, and shadow direction and copy the generated CSS into your project.

#Design handoff

The registry CSS is the current source of truth. A design kit will be linked only when it mirrors the shipped tokens and is maintained alongside component changes.