Skip to content
Foundation · Design Tokens v2

Semantic Token Taxonomy

Three-tier token architecture. Primitives name raw values. Semantic tokens name intent. Component tokens are scoped aliases. Components consume only semantic tokens — never primitives, never raw values.

Tier 01
Primitive
--bh-*--bh-red: #D42020
tokens/bauhaus.css
Tier 02
Semantic
--ds-*--ds-color-agency: var(--bh-red)
tokens/semantic.css
Tier 03
Component
--ds-btn-*--ds-btn-primary-bg: var(--ds-surface-inverse)
tokens/semantic.css (bottom)

Color Tokens

Color communicates meaning, not aesthetics. Three semantic pillars, three outcome levels, one error state.

Three semantic pillars. Color communicates meaning — never decoration. Each pillar has a base, subtle tint, and foreground variant.

TokenValuePrimitiveDescription
--ds-color-agency
#D42020
--bh-redAI authority, active states, destructive actions, agent-initiated eventscopy
--ds-color-agency-subtle
#FFEBEB
Tinted surface behind agency content — badges, banners, hover statescopy
--ds-color-agency-fg
#FFFFFF
--bh-whiteForeground (text/icon) on agency-colored backgroundscopy
--ds-color-temporal
#2B44D4
--bh-blueProcessing, in-flight, informational, historical, linkscopy
--ds-color-temporal-subtle
#EBEBFF
Tinted surface behind temporal contentcopy
--ds-color-temporal-fg
#FFFFFF
--bh-whiteForeground on temporal-colored backgroundscopy
--ds-color-validation
#C49A1A
--bh-yellowEnrichment, quality signals, caution, threshold proximity, confirmationcopy
--ds-color-validation-subtle
#FFF0C8
Tinted surface behind validation contentcopy
--ds-color-validation-fg
#18181B
--bh-blackForeground on validation-colored backgrounds (dark for contrast on gold)copy

Spacing Tokens

8px base unit. Three axis groups: inset (padding), stack (vertical gap), inline (horizontal gap).

TokenValuePrimitiveDescription
--ds-space-inset-xs4pxCompact: icon padding, tight badge insetscopy
--ds-space-inset-sm8pxSmall: button padding block, chip insetscopy
--ds-space-inset-md12px 16pxDefault: card padding, panel insetscopy
--ds-space-inset-lg16px 24pxSpacious: dialog body, section paddingcopy
--ds-space-stack-xs4pxTight vertical rhythm: label → inputcopy
--ds-space-stack-sm8pxNormal vertical rhythm: form fieldscopy
--ds-space-stack-md16pxSection spacing: groups of controlscopy
--ds-space-stack-lg24pxPage section spacingcopy
--ds-space-stack-xl40pxMajor page sections, template spacingcopy
--ds-space-inline-xs4pxIcon + label gapcopy
--ds-space-inline-sm8pxButton icon + text gap, badge paddingcopy
--ds-space-inline-md16pxDefault column gapcopy
--ds-space-inline-lg24pxCard grid gapcopy

Typography Tokens

Font families and type scale. Numbers, codes, amounts, and IDs must use the mono font with tabular-nums.

TokenValuePrimitiveDescription
--ds-type-display-fontvar(--font-inter, system-ui)Display / heading typefacecopy
--ds-type-body-fontvar(--font-inter, system-ui)Body / prose typefacecopy
--ds-type-mono-fontvar(--font-mono, 'JetBrains Mono')Monospace: numbers, codes, IDs, amountscopy
--ds-type-label-fontvar(--font-inter, system-ui)Label typeface (uppercase, tracked)copy
--ds-type-size-hero40pxHero headlinecopy
--ds-type-size-h136pxPage titlecopy
--ds-type-size-h222pxSection headingcopy
--ds-type-size-h317pxSubsection headingcopy
--ds-type-size-body15pxBody textcopy
--ds-type-size-label11pxLabels, overlines (min 10px floor)copy
--ds-type-size-caption11pxCaptions, metadatacopy

What Changed in v2

Taxonomy refinements, new tokens, and renamed aliases. See the migration guide for codemods and step-by-step upgrade instructions.

New tokens
--ds-color-action-primaryExplicit action color separate from surface-inverse
--ds-color-compare-{a-d}Ordinal comparison backgrounds (A=red tint → D=blue tint)
--ds-border-focusDedicated focus ring token (was hardcoded in component CSS)
--ds-text-disabledExplicit disabled text token (was overloaded with muted)
--ds-surface-overlayThird surface level for hover/selection states
Renamed tokens
--ds-color-success → --ds-color-outcome-positiveOutcome tier replaces flat success/warning/error names
--ds-color-warning → --ds-color-outcome-cautionCaution semantics: near-limit, not just warning
--ds-color-danger → --ds-color-outcome-negativeNegative outcome (distinct from --ds-color-error)
Dark-mode derivation
[.dark] overridesDark mode now applied via class-based .dark selector on <html>
Surface tokens invertedground/raised/inverse all swap appropriately in dark mode
Text contrast preservedAll text tokens maintain WCAG AA at their dark-mode values

Naming Convention

--ds-{group}-{intent}[-{modifier}]Semantic token pattern
--bh-{name}[-{scale}]Primitive token pattern
--ds-{component}-{property}[-{state}]Component token pattern
Rule: Never skip a layer

Components must reference --ds-* semantic tokens. Semantic tokens reference --bh-* primitives. Raw hex values and primitive tokens are banned in component CSS. This indirection is what makes theming, dark mode, and white-labeling work.

Related