Tokens
@codeui/solid v0.3.0
The --cui-* custom properties every kit style reads.
Every color, radius, space, size, shadow and motion value in the kit is a --cui-* CSS custom property. Kit components read only these properties, so changing one changes every component that uses it. The kit defines 143 of them.
Each swatch above is one color token, read in the dark mode and in the light mode. The tables below list every token.
How a name is built
A name is --cui- followed by the token path in kebab case. The path surface.menuHover becomes --cui-surface-menu-hover. A half step uses a hyphen, so space.1.5 becomes --cui-space-1-5.
The CSS name is the stable public API. In TypeScript, the tokens export holds the same paths, and each leaf is a var(--cui-…) string.
:root sets every token. Most color tokens differ between dark and light, and data-cui-theme picks the mode. Each [data-cui-theme] scope sets again only the tokens whose dark and light values differ, plus the tokens computed from another token: --cui-focus-color, the radii and the brand colors. Theming covers the attribute and overrides.
See How the build generates tokens for the JSON resolver and the Button stylesheet example.
Read a token in your styles
import { Button, Text } from "@codeui/solid";
export default function TokensUsage() {
return (
<div
style={{
display: "flex",
"align-items": "center",
gap: "var(--cui-space-3)",
padding: "var(--cui-space-3) var(--cui-space-4)",
"border-radius": "var(--cui-radius-card)",
background: "var(--cui-surface-input)",
color: "var(--cui-text-default)",
}}
>
<Text size="caption">fibonacci.ts</Text>
<Button variant="primary" size="sm">
Export PNG
</Button>
</div>
);
}The card above reads four tokens with var(). The button reads the same tokens through its own styles.
Design rules
The design rules for each role live in Inkstone: Colour, Typography, Space and shape and Motion. This page lists the values.
Read the tables
Each group has a live table and a static table. The live table reads every value from your browser with getComputedStyle, inside a data-cui-theme="dark" scope and a data-cui-theme="light" scope. It shows what the kit really ships. The static table lists the values in packages/inkstone/src/theme-values.ts, the one registry that both modes come from. Agents and the Markdown route read the static table.
pnpm --filter @codeui/solid test checks every name and value against docs/kit-2026/design/k5-token-map.json.
Colour ramp matrix
Each row pairs a Gosfuig ramp step with the CSS tokens that directly alias it in Light and Dark. blue.500 supplies --cui-action-brand-base in both modes. A dash marks a step with no direct alias in that mode.
Shared greys
| Ramp step | Light | Dark |
|---|---|---|
gray.50#ffffff | --cui-surface-toolbar--cui-surface-dialog--cui-surface-input-accent--cui-surface-menu--cui-surface-toast | — |
gray.100#fafafa | --cui-surface-panel | — |
gray.150#f1f1f1 | --cui-surface-canvas | --cui-text-default--cui-text-dialog--cui-text-dialog-title--cui-text-label--cui-text-input--cui-text-menu--cui-text-panel--cui-text-toast--cui-action-neutral-text |
gray.250#e6e6e6 | --cui-surface-input--cui-surface-menu-hover | — |
gray.300#dcdcdc | --cui-surface-field-hover--cui-surface-secondary--cui-action-neutral-base--cui-action-neutral-hover--cui-border-dialog-title--cui-border-divider--cui-border-menu | — |
gray.350#cccccc | --cui-surface-scroll-thumb--cui-action-neutral-active | — |
gray.400#bbbbbb | --cui-surface-scroll-thumb-hover--cui-text-disabled | — |
gray.450#aaaaaa | — | --cui-text-toolbar--cui-text-muted--cui-text-hint--cui-text-panel-muted |
gray.550#8c8c8c | --cui-surface-track | --cui-text-tertiary |
gray.600#666666 | --cui-text-tertiary | --cui-surface-scroll-thumb-hover--cui-text-disabled |
gray.650#535353 | --cui-text-toolbar--cui-text-muted--cui-text-hint--cui-text-panel-muted | --cui-surface-input-accent--cui-surface-scroll-thumb--cui-surface-track--cui-action-neutral-active |
gray.700#373737 | — | --cui-surface-field-hover--cui-surface-menu-hover--cui-surface-secondary--cui-action-neutral-hover--cui-border-menu |
gray.750#292929 | — | --cui-surface-toolbar--cui-surface-input--cui-action-neutral-base--cui-border-dialog-title |
gray.850#252525 | — | --cui-surface-dialog--cui-surface-menu--cui-surface-toast--cui-border-divider |
gray.900#1c1c1c | --cui-text-default--cui-text-dialog--cui-text-dialog-title--cui-text-label--cui-text-input--cui-text-menu--cui-text-panel--cui-text-toast--cui-action-neutral-text | --cui-surface-panel |
gray.950#111111 | — | --cui-surface-canvas |
Accent blue
| Ramp step | Light | Dark |
|---|---|---|
blue.25#f4f9ff | — | — |
blue.50#d6e9fc | — | — |
blue.100#b8d8f6 | — | — |
blue.200#91c6f2 | — | — |
blue.300#63b3ed | — | --cui-action-brand-soft-text--cui-accent-focus |
blue.400#3495e1 | — | — |
blue.500#0076cf | --cui-action-brand-base--cui-accent-selection | --cui-action-brand-base--cui-accent-selection |
blue.600#0068b9 | --cui-action-brand-hover--cui-accent-focus | --cui-action-brand-hover |
blue.700#004f8e | --cui-action-brand-active--cui-action-brand-soft-text | --cui-action-brand-active |
blue.800#053865 | — | — |
blue.900#082440 | — | — |
blue.950#011227 | — | — |
Danger red
| Ramp step | Light | Dark |
|---|---|---|
red.25#fff6f5 | — | — |
red.50#ffdeda | — | — |
red.100#fec3bf | — | — |
red.200#ffa4a0 | — | — |
red.300#fc8181 | — | --cui-text-danger |
red.400#e45857 | — | — |
red.500#c53030 | --cui-text-danger--cui-action-danger-base | --cui-action-danger-base |
red.600#b52b2b | --cui-action-danger-hover | --cui-action-danger-hover |
red.700#9b2c2c | --cui-action-danger-active | --cui-action-danger-active |
red.800#6b2321 | — | — |
red.900#411816 | — | — |
red.950#240706 | — | — |
Caution orange
| Ramp step | Light | Dark |
|---|---|---|
orange.25#fff7f0 | — | — |
orange.50#ffead7 | — | — |
orange.100#fedbbd | — | — |
orange.200#ffc999 | — | — |
orange.300#ffb570 | — | — |
orange.400#faa043 | — | — |
orange.500#f08c00 | --cui-action-caution-base | --cui-action-caution-base |
orange.600#d77d00 | --cui-action-caution-hover | --cui-action-caution-hover |
orange.700#bd6e00 | --cui-action-caution-active | --cui-action-caution-active |
orange.800#7f4b0d | — | — |
orange.900#4a2b0a | — | — |
orange.950#1e0d00 | — | — |
Success green
| Ramp step | Light | Dark |
|---|---|---|
green.25#ecfef1 | — | — |
green.50#ddf3e3 | — | — |
green.100#c6ead1 | — | — |
green.200#aae1bc | — | — |
green.300#89d6a4 | — | — |
green.400#67ca8d | — | — |
green.500#48bb78 | --cui-action-success-base | --cui-action-success-base |
green.600#38a169 | --cui-action-success-hover | --cui-action-success-hover |
green.700#2f855a | --cui-action-success-active | --cui-action-success-active |
green.800#215b3c | — | — |
green.900#123622 | — | — |
green.950#001708 | — | — |
Surfaces
The backgrounds of pages, islands, fields and floating layers. The names are inverted today. surface.canvas is the island and surface.panel is the page. See Colour for the level each one fills.
| Token | CSS variable | Dark | Light |
|---|---|---|---|
surface.canvas | --cui-surface-canvas | #111111 | #f1f1f1 |
surface.toolbar | --cui-surface-toolbar | #292929 | #ffffff |
surface.scrim | --cui-surface-scrim | #000000b3 | #0006 |
surface.dialog | --cui-surface-dialog | #252525 | #ffffff |
surface.inputAccent | --cui-surface-input-accent | #535353 | #ffffff |
surface.input | --cui-surface-input | #292929 | #e6e6e6 |
surface.fieldHover | --cui-surface-field-hover | #373737 | #dcdcdc |
surface.menuHover | --cui-surface-menu-hover | #373737 | #e6e6e6 |
surface.menu | --cui-surface-menu | #252525 | #ffffff |
surface.panel | --cui-surface-panel | #1c1c1c | #fafafa |
surface.scrollThumb | --cui-surface-scroll-thumb | #535353 | #cccccc |
surface.scrollThumbHover | --cui-surface-scroll-thumb-hover | #666666 | #bbbbbb |
surface.secondary | --cui-surface-secondary | #373737 | #dcdcdc |
surface.toast | --cui-surface-toast | #252525 | #ffffff |
surface.track | --cui-surface-track | #535353 | #8c8c8c |
The light and dark surfaces share a grey ramp (Colour). surface.fieldHover is one fill step above a field, for a hovered or selected card. surface.track is the switch off track. surface.secondary uses gray.300 in light and gray.700 in dark. No component reads it. Only the deprecated themeVars.neutralSoft alias points at it.
Text
| Token | CSS variable | Dark | Light |
|---|---|---|---|
text.default | --cui-text-default | #f1f1f1 | #1c1c1c |
text.toolbar | --cui-text-toolbar | #aaaaaa | #535353 |
text.muted | --cui-text-muted | #aaaaaa | #535353 |
text.dialog | --cui-text-dialog | #f1f1f1 | #1c1c1c |
text.dialogTitle | --cui-text-dialog-title | #f1f1f1 | #1c1c1c |
text.label | --cui-text-label | #f1f1f1 | #1c1c1c |
text.hint | --cui-text-hint | #aaaaaa | #535353 |
text.tertiary | --cui-text-tertiary | #8c8c8c | #666666 |
text.disabled | --cui-text-disabled | #666666 | #bbbbbb |
text.input | --cui-text-input | #f1f1f1 | #1c1c1c |
text.selected | --cui-text-selected | #fff | #fff |
text.menu | --cui-text-menu | #f1f1f1 | #1c1c1c |
text.panelMuted | --cui-text-panel-muted | #aaaaaa | #535353 |
text.panel | --cui-text-panel | #f1f1f1 | #1c1c1c |
text.toast | --cui-text-toast | #f1f1f1 | #1c1c1c |
text.danger | --cui-text-danger | #fc8181 | #c53030 |
text.default is primary and text.muted and text.hint are secondary in both modes. Use text.tertiary only on the page, an island or a field, and text.disabled for unavailable controls.
Action and accent
action.* colors fill buttons and other controls. Each action has base, hover, active and text. accent.focus is the focus ring, and accent.selection marks a selected item.
| Token | CSS variable | Dark | Light |
|---|---|---|---|
action.neutral.active | --cui-action-neutral-active | #535353 | #cccccc |
action.neutral.base | --cui-action-neutral-base | #292929 | #dcdcdc |
action.neutral.hover | --cui-action-neutral-hover | #373737 | #dcdcdc |
action.neutral.text | --cui-action-neutral-text | #f1f1f1 | #1c1c1c |
action.brand.active | --cui-action-brand-active | #004f8e | #004f8e |
action.brand.base | --cui-action-brand-base | #0076cf | #0076cf |
action.brand.hover | --cui-action-brand-hover | #0068b9 | #0068b9 |
action.brand.text | --cui-action-brand-text | #fff | #fff |
action.brandSoft.base | --cui-action-brand-soft-base | #0076cf26 | #0076cf26 |
action.brandSoft.hover | --cui-action-brand-soft-hover | #004f8e26 | #004f8e26 |
action.brandSoft.text | --cui-action-brand-soft-text | #63b3ed | #004f8e |
action.brandSoft.active | --cui-action-brand-soft-active | #004f8e26 | #004f8e26 |
accent.selection | --cui-accent-selection | #0076cf | #0076cf |
accent.focus | --cui-accent-focus | #63b3ed | #0068b9 |
The table lists the Inkstone values. In a browser that supports relative colors, the other brand and accent tokens in this table are computed from action.brand.base, so they follow it when you override it. With the Inkstone base they resolve to the values above. A browser without relative colors uses the values above as they are.
White text on action.brand.base (#0076cf) is 4.7:1. accent.selection is kept for compatibility and equals action.brand.base.
Status
Danger, caution and success. They mark a state the user must notice and never decorate.
| Token | CSS variable | Dark | Light |
|---|---|---|---|
action.danger.active | --cui-action-danger-active | #9b2c2c | #9b2c2c |
action.danger.base | --cui-action-danger-base | #c53030 | #c53030 |
action.danger.hover | --cui-action-danger-hover | #b52b2b | #b52b2b |
action.danger.text | --cui-action-danger-text | #fff | #fff |
action.caution.base | --cui-action-caution-base | #f08c00 | #f08c00 |
action.caution.hover | --cui-action-caution-hover | #d77d00 | #d77d00 |
action.caution.active | --cui-action-caution-active | #bd6e00 | #bd6e00 |
action.caution.text | --cui-action-caution-text | #000 | #000 |
action.success.base | --cui-action-success-base | #48bb78 | #48bb78 |
action.success.hover | --cui-action-success-hover | #38a169 | #38a169 |
action.success.active | --cui-action-success-active | #2f855a | #2f855a |
action.success.text | --cui-action-success-text | #000 | #000 |
In a browser that supports relative colors, each hover and active is computed from its base, so overriding the base changes all three. With the Inkstone bases they resolve to the values above.
Borders
| Token | CSS variable | Dark | Light |
|---|---|---|---|
border.dialogTitle | --cui-border-dialog-title | #292929 | #dcdcdc |
border.divider | --cui-border-divider | #252525 | #dcdcdc |
border.input | --cui-border-input | transparent | transparent |
border.menu | --cui-border-menu | #373737 | #dcdcdc |
border.width | --cui-border-width | 1px | 1px |
border.widthStrong | --cui-border-width-strong | 2px | 2px |
border.input is transparent. Fields are separated by fill, not by a line.
Focus
| Token | CSS variable | Dark | Light |
|---|---|---|---|
focus.color | --cui-focus-color | var(--cui-accent-focus) | var(--cui-accent-focus) |
focus.width | --cui-focus-width | 2px | 2px |
focus.offset | --cui-focus-offset | 2px | 2px |
focus.color points at accent.focus. Override --cui-accent-focus to change the ring color everywhere.
Radii
Every radius except none and full is its value times radius.scale. Set --cui-radius-scale to 0 for square corners or above 1 for rounder ones.
| Token | CSS variable | Value |
|---|---|---|
radius.scale | --cui-radius-scale | 1 |
radius.none | --cui-radius-none | 0px |
radius.badge | --cui-radius-badge | 6px |
radius.xs | --cui-radius-xs | 7px |
radius.sm | --cui-radius-sm | 9px |
radius.nav | --cui-radius-nav | 10px |
radius.md | --cui-radius-md | 12px |
radius.lg | --cui-radius-lg | 14px |
radius.card | --cui-radius-card | 16px |
radius.xl | --cui-radius-xl | 18px |
radius.command | --cui-radius-command | 22px |
radius.dialog | --cui-radius-dialog | 24px |
radius.full | --cui-radius-full | 9999px |
Spacing
| Token | CSS variable | Value |
|---|---|---|
space.0 | --cui-space-0 | 0 |
space.1 | --cui-space-1 | 0.25rem |
space.2 | --cui-space-2 | 0.5rem |
space.3 | --cui-space-3 | 0.75rem |
space.4 | --cui-space-4 | 1rem |
space.5 | --cui-space-5 | 1.25rem |
space.6 | --cui-space-6 | 1.5rem |
space.8 | --cui-space-8 | 2rem |
space.10 | --cui-space-10 | 2.5rem |
space.12 | --cui-space-12 | 3rem |
space.16 | --cui-space-16 | 4rem |
space.20 | --cui-space-20 | 5rem |
space.24 | --cui-space-24 | 6rem |
space.32 | --cui-space-32 | 8rem |
space.40 | --cui-space-40 | 10rem |
space.48 | --cui-space-48 | 12rem |
space.56 | --cui-space-56 | 14rem |
space.64 | --cui-space-64 | 16rem |
space.auto | --cui-space-auto | auto |
space.px | --cui-space-px | 1px |
space.0.5 | --cui-space-0-5 | 2px |
space.1.5 | --cui-space-1-5 | 6px |
space.2.5 | --cui-space-2-5 | 10px |
space.0.5, space.1.5 and space.2.5 are in pixels. The other steps are in rem.
Control heights
| Token | CSS variable | Value |
|---|---|---|
control.height.xs | --cui-control-height-xs | 28px |
control.height.sm | --cui-control-height-sm | 36px |
control.height.md | --cui-control-height-md | 44px |
control.height.lg | --cui-control-height-lg | 52px |
The table shows comfortable density. Controls default to sm. Comfortable is the default density. Compact multiplies heights by 0.875, and touch multiplies them by 1.125. Heights round to the nearest 2px. A coarse pointer selects touch density automatically. Set data-cui-density="compact|comfortable|touch" on an element to set density for its subtree. Font sizes stay tied to the control size.
Type scale
| Token | CSS variable | Value |
|---|---|---|
font.size.badge | --cui-font-size-badge | 11px |
font.size.xs | --cui-font-size-xs | 12px |
font.size.caption | --cui-font-size-caption | 13px |
font.size.sm | --cui-font-size-sm | 14px |
font.size.md | --cui-font-size-md | 16px |
font.size.lg | --cui-font-size-lg | 18px |
font.size.xl | --cui-font-size-xl | 20px |
font.size.2xl | --cui-font-size-2xl | 24px |
font.family.sans | --cui-font-family-sans | "Inter var", system-ui, -apple-system, sans-serif |
font.family.mono | --cui-font-family-mono | ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace |
font.weight.normal | --cui-font-weight-normal | 400 |
font.weight.medium | --cui-font-weight-medium | 500 |
font.weight.semibold | --cui-font-weight-semibold | 600 |
font.lineHeight.compact | --cui-font-line-height-compact | 1.15 |
font.lineHeight.snug | --cui-font-line-height-snug | 1.3 |
font.lineHeight.normal | --cui-font-line-height-normal | 1.5 |
font.lineHeight.badge | --cui-font-line-height-badge | 1.2 |
font.lineHeight.xs | --cui-font-line-height-xs | 1.4 |
font.lineHeight.caption | --cui-font-line-height-caption | 1.5 |
font.lineHeight.sm | --cui-font-line-height-sm | 1.3 |
font.lineHeight.md | --cui-font-line-height-md | 1.3 |
font.tracking.normal | --cui-font-tracking-normal | normal |
Each font.lineHeight step named after a size (badge, xs, caption, sm, md) is the leading for that size from the type scale. Controls set it on their text parts, so they never inherit the page's line height.
The kit does not load a font file. Without Inter, the stack falls back to the system font. Typography and spacing shows the scale in use.
Shadows
| Token | CSS variable | Dark | Light |
|---|---|---|---|
shadow.dialog | --cui-shadow-dialog | 0 10px 30px 0 #00000026, inset 0 0 0 1px #232323 | 0 10px 15px -3px #0000001a, 0 4px 6px -2px #0000000d |
shadow.menu | --cui-shadow-menu | 0 1px #0000000d, 0 4px 10px #0000004d | 0 1px #0000000d, 0 4px 10px #0000001a |
shadow.none | --cui-shadow-none | none | none |
shadow.sm | --cui-shadow-sm | 0 1px 3px 0 #0000001a, 0 1px 2px 0 #0000000f | 0 1px 3px 0 #0000001a, 0 1px 2px 0 #0000000f |
shadow.md | --cui-shadow-md | 0 4px 6px -1px #0000001a, 0 2px 4px -1px #0000000f | 0 4px 6px -1px #0000001a, 0 2px 4px -1px #0000000f |
shadow.thumb | --cui-shadow-thumb | 0 1px 2px #0000004d | 0 1px 2px #0000004d |
shadow.lg | --cui-shadow-lg | 0 10px 15px -3px #0000001a, 0 4px 6px -2px #0000000d | 0 10px 15px -3px #0000001a, 0 4px 6px -2px #0000000d |
Motion
| Token | CSS variable | Value |
|---|---|---|
motion.duration.none | --cui-motion-duration-none | 0ms |
motion.duration.fast | --cui-motion-duration-fast | 120ms |
motion.duration.normal | --cui-motion-duration-normal | 160ms |
motion.duration.panel | --cui-motion-duration-panel | 200ms |
motion.duration.slow | --cui-motion-duration-slow | 260ms |
motion.duration.rise | --cui-motion-duration-rise | 400ms |
motion.ease.out | --cui-motion-ease-out | cubic-bezier(0.23, 1, 0.32, 1) |
motion.ease.drawer | --cui-motion-ease-drawer | cubic-bezier(0.32, 0.72, 0, 1) |
Motion explains when to use each duration.