Underlith — open-source governance layer for design tokens.
- Site: https://mikaelcarrara.github.io/underlith/
- Repo: https://github.com/mikaelcarrara/underlith
- NPM:
@mikaelcarrara/underlithv2.1.1
- Hero: "Your brand is a contract. Underlith enforces it."
- Subtitle: "Governable design tokens for teams building across frameworks and platforms."
- CTA: "Create your source of truth"
- Key line: "Underlith is not your source of truth — it's the infrastructure to build one."
- Token Infrastructure
- CLI Integration
- Governance Tooling
- Level 1 — Underlith core (
@mikaelcarrara/underlith) — primitives, slow, stable - Level 2 —
@your-org/tokens— brand contract, your cadence - Level 3 — Product consumers — web, mobile, admin, AI agent
- Primitives
- Semantic
- Brand
- Naming:
--ul-{category}-{intent}canonical,--ul-color-{intent}alias - Single consumption path:
var(--ul-color-*)only — no literals anywhere - Alias mapping lives in
globals.cssonly — never in components @your-org/tokensis the only import products needunderlith.base.css/underlith.brand.css— Underlith core (Level 1)your-org.base.css/your-org.brand.css— generated bybrand init(Level 2)
# New project
underlith brand init --org your-npm-username
# Existing shadcn project
underlith init --shadcn --globals ./styles/globals.css
# Roadmap
underlith migrate # AI-assisted literal → token replacement
underlith audit # token adoption coverage reportbuild:tokenslint:tokenslint:tokens-check— detects hardcoded literals in componentsbreaking-change detectiontest:contrast— WCAG AA for status and brand tokensvisual-regression(recommended)audit-log
--ul-status-success: oklch(0.30 0.13 145);
--ul-status-success-bg: oklch(0.98 0.03 145);
--ul-status-warning: oklch(0.40 0.12 75);
--ul-status-warning-bg: oklch(0.97 0.04 75);
--ul-status-error: oklch(0.40 0.16 25);
--ul-status-error-bg: oklch(0.97 0.04 25);
--ul-status-info: oklch(0.40 0.13 240);
--ul-status-info-bg: oklch(0.97 0.04 240);| File | Status |
|---|---|
ai-agents.html |
✓ updated |
OVERVIEW.md |
✓ three main layers, Observability moved to roadmap |
GOVERNANCE.md |
✓ three levels, token drift, agent-readiness, CI table |
README.md |
✓ usage examples show @your-org/tokens, not underlith direct |
.cursorrules |
✓ governance-only, for users to drop in their project |
agent-thinking.html |
✓ animated agent thinking UI for AI & Agents section |
governance.html |
✓ aligned with GOVERNANCE.md |
Animated component simulating an AI agent operating within token governance rules.
- Vertical line with traveling dot (JS-controlled, stops at last item)
- Four groups: resolve → validate → drift → output
- Each group ends with a dry observational summary line
- Color rules:
--ul-*token names in lime,var(in white,.tsxfiles near-white, status column colored - Metaphor: what a
.cursorruleswith Underlith governance rules does in practice - Intended for the
ai-agents.htmlpage, section "Token governance for AI-generated UI"
- Integrate
agent-thinking.htmlintoai-agents.htmlsection - Commit all docs to main repo
- Rafael to merge Kobana PR and publish
@kobana/tokens -
underlith migrate— roadmap implementation
- Q3 2026 — Automation (linter, pre-commit hooks, CI templates,
underlith audit) - Q4 2026 — Ecosystem (
underlith migrate, TypeScript types, visual regression, MCP server, Figma sync) - Future — Control Plane (project registry, token version tracking, dependency graphs)