Skip to Content
CodeUI

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.

surface-canvas
surface-panel
surface-input
surface-dialog
text-default
text-muted
action-brand-base
action-neutral-base
action-success-base
action-caution-base
action-danger-base
accent-focus
surface-canvas
surface-panel
surface-input
surface-dialog
text-default
text-muted
action-brand-base
action-neutral-base
action-success-base
action-caution-base
action-danger-base
accent-focus

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

fibonacci.ts
tokens/usage.tsx
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 stepLightDark
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 stepLightDark
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 stepLightDark
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 stepLightDark
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 stepLightDark
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.

TokenDarkLight
--cui-surface-canvas
--cui-surface-toolbar
--cui-surface-scrim
--cui-surface-dialog
--cui-surface-input-accent
--cui-surface-input
--cui-surface-field-hover
--cui-surface-menu-hover
--cui-surface-menu
--cui-surface-panel
--cui-surface-scroll-thumb
--cui-surface-scroll-thumb-hover
--cui-surface-secondary
--cui-surface-toast
--cui-surface-track
TokenCSS variableDarkLight
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

TokenDarkLight
--cui-text-default
--cui-text-toolbar
--cui-text-muted
--cui-text-dialog
--cui-text-dialog-title
--cui-text-label
--cui-text-hint
--cui-text-tertiary
--cui-text-disabled
--cui-text-input
--cui-text-selected
--cui-text-menu
--cui-text-panel-muted
--cui-text-panel
--cui-text-toast
--cui-text-danger
TokenCSS variableDarkLight
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.

TokenDarkLight
--cui-action-neutral-active
--cui-action-neutral-base
--cui-action-neutral-hover
--cui-action-neutral-text
--cui-action-brand-active
--cui-action-brand-base
--cui-action-brand-hover
--cui-action-brand-text
--cui-action-brand-soft-base
--cui-action-brand-soft-hover
--cui-action-brand-soft-text
--cui-action-brand-soft-active
--cui-accent-selection
--cui-accent-focus
TokenCSS variableDarkLight
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.

TokenDarkLight
--cui-action-danger-active
--cui-action-danger-base
--cui-action-danger-hover
--cui-action-danger-text
--cui-action-caution-base
--cui-action-caution-hover
--cui-action-caution-active
--cui-action-caution-text
--cui-action-success-base
--cui-action-success-hover
--cui-action-success-active
--cui-action-success-text
TokenCSS variableDarkLight
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

TokenDarkLight
--cui-border-dialog-title
--cui-border-divider
--cui-border-input
--cui-border-menu
TokenValue
--cui-border-width
--cui-border-width-strong
TokenCSS variableDarkLight
border.dialogTitle--cui-border-dialog-title#292929#dcdcdc
border.divider--cui-border-divider#252525#dcdcdc
border.input--cui-border-inputtransparenttransparent
border.menu--cui-border-menu#373737#dcdcdc
border.width--cui-border-width1px1px
border.widthStrong--cui-border-width-strong2px2px

border.input is transparent. Fields are separated by fill, not by a line.

Focus

TokenDarkLight
--cui-focus-color
TokenValue
--cui-focus-width
--cui-focus-offset
TokenCSS variableDarkLight
focus.color--cui-focus-colorvar(--cui-accent-focus)var(--cui-accent-focus)
focus.width--cui-focus-width2px2px
focus.offset--cui-focus-offset2px2px

focus.color points at accent.focus. Override --cui-accent-focus to change the ring color everywhere.

Radii

TokenValue
--cui-radius-scale
--cui-radius-none
--cui-radius-badge
--cui-radius-xs
--cui-radius-sm
--cui-radius-nav
--cui-radius-md
--cui-radius-lg
--cui-radius-card
--cui-radius-xl
--cui-radius-command
--cui-radius-dialog
--cui-radius-full

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.

TokenCSS variableValue
radius.scale--cui-radius-scale1
radius.none--cui-radius-none0px
radius.badge--cui-radius-badge6px
radius.xs--cui-radius-xs7px
radius.sm--cui-radius-sm9px
radius.nav--cui-radius-nav10px
radius.md--cui-radius-md12px
radius.lg--cui-radius-lg14px
radius.card--cui-radius-card16px
radius.xl--cui-radius-xl18px
radius.command--cui-radius-command22px
radius.dialog--cui-radius-dialog24px
radius.full--cui-radius-full9999px

Spacing

TokenValue
--cui-space-0
--cui-space-1
--cui-space-2
--cui-space-3
--cui-space-4
--cui-space-5
--cui-space-6
--cui-space-8
--cui-space-10
--cui-space-12
--cui-space-16
--cui-space-20
--cui-space-24
--cui-space-32
--cui-space-40
--cui-space-48
--cui-space-56
--cui-space-64
--cui-space-auto
--cui-space-px
--cui-space-0-5
--cui-space-1-5
--cui-space-2-5
TokenCSS variableValue
space.0--cui-space-00
space.1--cui-space-10.25rem
space.2--cui-space-20.5rem
space.3--cui-space-30.75rem
space.4--cui-space-41rem
space.5--cui-space-51.25rem
space.6--cui-space-61.5rem
space.8--cui-space-82rem
space.10--cui-space-102.5rem
space.12--cui-space-123rem
space.16--cui-space-164rem
space.20--cui-space-205rem
space.24--cui-space-246rem
space.32--cui-space-328rem
space.40--cui-space-4010rem
space.48--cui-space-4812rem
space.56--cui-space-5614rem
space.64--cui-space-6416rem
space.auto--cui-space-autoauto
space.px--cui-space-px1px
space.0.5--cui-space-0-52px
space.1.5--cui-space-1-56px
space.2.5--cui-space-2-510px

space.0.5, space.1.5 and space.2.5 are in pixels. The other steps are in rem.

Control heights

TokenValue
--cui-control-height-xs
--cui-control-height-sm
--cui-control-height-md
--cui-control-height-lg
TokenCSS variableValue
control.height.xs--cui-control-height-xs28px
control.height.sm--cui-control-height-sm36px
control.height.md--cui-control-height-md44px
control.height.lg--cui-control-height-lg52px

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

TokenValue
--cui-font-size-badge
Export snippet
--cui-font-size-xs
Export snippet
--cui-font-size-caption
Export snippet
--cui-font-size-sm
Export snippet
--cui-font-size-md
Export snippet
--cui-font-size-lg
Export snippet
--cui-font-size-xl
Export snippet
--cui-font-size-2xl
Export snippet
TokenValue
--cui-font-family-sans
--cui-font-family-mono
--cui-font-weight-normal
--cui-font-weight-medium
--cui-font-weight-semibold
--cui-font-line-height-compact
--cui-font-line-height-snug
--cui-font-line-height-normal
--cui-font-line-height-badge
--cui-font-line-height-xs
--cui-font-line-height-caption
--cui-font-line-height-sm
--cui-font-line-height-md
--cui-font-tracking-normal
TokenCSS variableValue
font.size.badge--cui-font-size-badge11px
font.size.xs--cui-font-size-xs12px
font.size.caption--cui-font-size-caption13px
font.size.sm--cui-font-size-sm14px
font.size.md--cui-font-size-md16px
font.size.lg--cui-font-size-lg18px
font.size.xl--cui-font-size-xl20px
font.size.2xl--cui-font-size-2xl24px
font.family.sans--cui-font-family-sans"Inter var", system-ui, -apple-system, sans-serif
font.family.mono--cui-font-family-monoui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace
font.weight.normal--cui-font-weight-normal400
font.weight.medium--cui-font-weight-medium500
font.weight.semibold--cui-font-weight-semibold600
font.lineHeight.compact--cui-font-line-height-compact1.15
font.lineHeight.snug--cui-font-line-height-snug1.3
font.lineHeight.normal--cui-font-line-height-normal1.5
font.lineHeight.badge--cui-font-line-height-badge1.2
font.lineHeight.xs--cui-font-line-height-xs1.4
font.lineHeight.caption--cui-font-line-height-caption1.5
font.lineHeight.sm--cui-font-line-height-sm1.3
font.lineHeight.md--cui-font-line-height-md1.3
font.tracking.normal--cui-font-tracking-normalnormal

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

TokenDarkLight
--cui-shadow-dialog
--cui-shadow-menu
--cui-shadow-none
--cui-shadow-sm
--cui-shadow-md
--cui-shadow-thumb
--cui-shadow-lg
TokenCSS variableDarkLight
shadow.dialog--cui-shadow-dialog0 10px 30px 0 #00000026, inset 0 0 0 1px #2323230 10px 15px -3px #0000001a, 0 4px 6px -2px #0000000d
shadow.menu--cui-shadow-menu0 1px #0000000d, 0 4px 10px #0000004d0 1px #0000000d, 0 4px 10px #0000001a
shadow.none--cui-shadow-nonenonenone
shadow.sm--cui-shadow-sm0 1px 3px 0 #0000001a, 0 1px 2px 0 #0000000f0 1px 3px 0 #0000001a, 0 1px 2px 0 #0000000f
shadow.md--cui-shadow-md0 4px 6px -1px #0000001a, 0 2px 4px -1px #0000000f0 4px 6px -1px #0000001a, 0 2px 4px -1px #0000000f
shadow.thumb--cui-shadow-thumb0 1px 2px #0000004d0 1px 2px #0000004d
shadow.lg--cui-shadow-lg0 10px 15px -3px #0000001a, 0 4px 6px -2px #0000000d0 10px 15px -3px #0000001a, 0 4px 6px -2px #0000000d

Motion

TokenValue
--cui-motion-duration-none
--cui-motion-duration-fast
--cui-motion-duration-normal
--cui-motion-duration-panel
--cui-motion-duration-slow
--cui-motion-duration-rise
--cui-motion-ease-out
--cui-motion-ease-drawer
TokenCSS variableValue
motion.duration.none--cui-motion-duration-none0ms
motion.duration.fast--cui-motion-duration-fast120ms
motion.duration.normal--cui-motion-duration-normal160ms
motion.duration.panel--cui-motion-duration-panel200ms
motion.duration.slow--cui-motion-duration-slow260ms
motion.duration.rise--cui-motion-duration-rise400ms
motion.ease.out--cui-motion-ease-outcubic-bezier(0.23, 1, 0.32, 1)
motion.ease.drawer--cui-motion-ease-drawercubic-bezier(0.32, 0.72, 0, 1)

Motion explains when to use each duration.

On this page