Brik Design System
Foundation

Token Anatomy

The six disambiguated concepts that describe every BDS token — Anatomy, Tier, Library, Layer, Mode, Tenet — and the four-tier abstraction stack every token belongs to.

Every BDS token answers six independent questions. Without distinct vocabulary for each, agents and humans invent parallel taxonomies and the system drifts (portal #512 / #553, retired --theme-brik-*, retired --brand-{tier}). This page locks the vocabulary so the discipline lives in the words themselves.

Six concepts, six words

ConceptTermQuestion it answersValues
Naming structureAnatomyHow is it named?--{purpose}-{role}[-{state}]
Abstraction levelTierWhat kind of token is it?Raw · Primitive · Semantic · Component
Source of truthLibraryWhere is it defined?Foundations Library · [Client] Brand Kit Library
CSS cascade originLayerWhich @layer carries its value?bds-tokens · bds-components · client-theme · client-overrides
Value axisModeWhich axis varies its value?color light/dark · borderwidth thin/bold · spacing compact/spacious / etc.
System pillarTenetWhich system pillar governs it?Foundation · Theming · Motion · Content

These are orthogonal. A token has one answer for each. Mixing them — calling --brand-tertiary a "tier" because it sits at the top level — is the failure mode the cleanup retired.

Before referencing a token name, you should be able to answer all six. If you can't, you're guessing — verify against the canonical registry (dist/tokens.css) first.

Anatomy — the naming formula

Every token name follows --{purpose}-{role}[-{state}]. Each segment is fixed vocabulary:

SegmentAllowed valuesExample
purposepage, surface, background, text, border, color (primitives only)--background-…
roleClosed list — see Color foundations vocabulary--background-brand-primary
state (optional)hover, pressed, disabled--background-brand-primary-hover

Status, service-line, and presence semantic tokens follow the same anatomy with their own role vocabularies (--background-positive, --background-service-marketing, --background-presence-online).

Token names without a purpose prefix are drift. Examples retired by brik-bds#712: --brand-primary (missing purpose; legitimate form is --{purpose}-brand-primary), --theme-brik-* (entire namespace violates the anatomy). If you see something shaped --brand-X or --theme-X-Y in old code, it's drift and should not be referenced.

Tier — the four-tier abstraction stack

Every token sits at exactly one Tier. Higher tiers reference lower tiers via var(). Components only consume the upper tiers.

┌─────────────────────────────────────────────────────────┐
│  Tier 4 — Component    (TBD — placeholder)              │
│  Component-scoped tokens, bound to a specific component │
│  Example: --bds-button-primary-padding-x (not yet       │
│  emitted as a tier; deliberately unspecified)           │
└─────────────────────────────────────────────────────────┘

                          │ var()
┌─────────────────────────────────────────────────────────┐
│  Tier 3 — Semantic     (what components consume)        │
│  --{purpose}-{role}: var(--color-{family}-{step})       │
│  Example: --background-brand-primary:                   │
│             var(--color-poppy-dark)                     │
└─────────────────────────────────────────────────────────┘

                          │ var()
┌─────────────────────────────────────────────────────────┐
│  Tier 2 — Primitive    (named raw values)               │
│  --color-{family}-{step}: #hex                          │
│  Example: --color-poppy-dark: #b0351b                   │
└─────────────────────────────────────────────────────────┘


┌─────────────────────────────────────────────────────────┐
│  Tier 1 — Raw          (literal hex / numeric value)    │
│  Not a CSS variable — the literal value before naming.  │
│  Example: #b0351b                                       │
└─────────────────────────────────────────────────────────┘

What lives at each Tier

TierNamingSourceComponents reference it?
RawLiteral #b0351bFigma swatch / hex chosen by designNo — never in component CSS
Primitive--color-{family}-{step} (color), --font-size-{step} (type), --space-{step} (spacing), etc.Auto-generated from Figma Variables → Style DictionaryNo — never in component CSS (use Semantic)
Semantic--{purpose}-{role} — Color foundations vocabularyAuto-generated; client themes override values with same namesYes — this is the contract
ComponentTBD — deliberately unspecifiedTBDTBD

Components consume Semantic tokens, never Primitives directly. A button's CSS references --background-brand-primary, not --color-poppy-dark. Why: Semantic is the layer that varies per brand. Bypassing it locks the component to one brand.

About Tier 4 (Component)

The system has not yet specified a Component tier. The pattern would be --bds-{component}-{property} — component-scoped tokens that bind a specific component to specific values. Today most components consume Semantic tokens directly, which is sufficient for current scale. Do not invent Component-tier tokens until the canonical pattern lands.

How the six concepts map to a real token

Take --background-brand-primary (the hot path):

ConceptAnswer
Anatomy--{purpose: background}-{role: brand-primary}
TierSemantic
LibraryDefined in Foundations Library as the canonical name; the value is overridden by each Brand Kit Library
Layerbds-tokens for the canonical default; client-theme for the per-client override
ModeVaries by color mode (light / dark)
TenetFoundation (token canon) + Theming (brand override)

Every legitimate token answers all six. If a token doesn't fit any one of them, it's drift.

Drift patterns to recognize (and not extend)

Drift patternWhy it's wrongRetired in
--theme-{name}-* (--theme-brik-green, --theme-blue-blue-light)Doesn't match Anatomy — no purpose prefix. Duplicate alias of a --color-{family}-{step} primitive.brik-bds#712 / #727
--brand-{tier} (--brand-primary, --brand-tertiary)Brand-tier names without purpose prefix. Legitimate composed form is --{purpose}-brand-{tier}.brik-bds#712 / #727
--surface-paper, --text-on-ink, --surface-soft, --surface-warmInvented modifiers or invented role values that aren't in the closed Color foundations vocabulary. Always parallel taxonomy.portal #512 / #553 (rolled back)
Component CSS reading --color-{family}-{step} directlyBypasses the Semantic tier. Locks the component to one brand.Caught by scripts/lint-tokens.js

Inventing parallel taxonomy is the failure mode this vocabulary exists to prevent. Three rollbacks (portal #512, portal #553, brik-bds#712 cleanup) trace to agents inventing names that almost fit. When in doubt, verify in dist/tokens.css — if the name isn't there, it isn't real.

Verifying a token before referencing it

# Is this name in the canonical registry?
rg '\-\-{token-name}' node_modules/@brikdesigns/bds/dist/tokens.css

# Or run the consumer-side gate
./scripts/token-audit.sh --canonical-only

If the gate is missing or the name isn't found, stop. Don't ship a var() call against a name that doesn't exist.

On this page