Skip to content

Design Tokens

Scaffolds a design token system with base primitives, semantic aliases, theme configuration, and optional dark mode definitions. Tokens follow a three-tier architecture: base values define raw primitives, semantic tokens map intent to base values, and themes override semantic tokens for different contexts.

Namedesign-tokens
Version0.1.0
Categorydesign
LicenseApache-2.0
Personadesign
Tagstokens, design, theming, dark-mode, css-variables
Sourcetemplates/design-tokens

Render it

Three front doors, one catalog. Pick whichever suits the caller.

# CLI
npx @nanohype/sdk render design-tokens --out ./my-app

# SDK
import { LocalSource, renderTemplate } from "@nanohype/sdk";
const result = await renderTemplate(source, "design-tokens", variables);

# MCP — from an agent
get_template({ name: "design-tokens" })

Variables

Required

ProjectName string
Kebab-case project name, used as directory and token prefix Must be lowercase kebab-case starting with a letter.

Optional

TokenFormat string — defaults to json
Primary output format for token files
IncludeDarkMode bool — defaults to true
Include dark mode token overrides

What it produces

4 files. Placeholder names such as __APP_NAME__ are what the renderer substitutes into.

tokens/base.json
tokens/dark.json
tokens/semantic.json
tokens/theme-config.yaml

Composes with

Composites that use it

  • Product Launch — Full product launch kit spanning engineering, design, QA, product, marketing, and operations.