Skills › BMAD Method › bmad-ux › design-md-spec.md
design-md-spec.md
50 lines · skills/bmad-ux/references/design-md-spec.md at bd70c64
1# DESIGN.md Spec — Working Reference
3Source of truth: [google-labs-code/design.md](https://github.com/google-labs-code/design.md) (Apache 2.0, Google Labs, April 2026). This file is a working summary; the URL wins on conflict.
DESIGN.md Spec — Working Reference
Source of truth: google-labs-code/design.md (Apache 2.0, Google Labs, April 2026). This file is a working summary; the URL wins on conflict.
Raw lines 1 to 45## Structure
7YAML frontmatter (machine-readable tokens) + markdown body (human-readable rationale, prose sections).
Structure
YAML frontmatter (machine-readable tokens) + markdown body (human-readable rationale, prose sections).
Raw lines 5 to 89## Frontmatter tokens
11| Key | Type | Notes |
12|---|---|---|
13| `name` | string | Required. Brand or system name. |
14| `description` | string | One-line statement of what this system is. |
15| `colors` | flat object | Kebab-case keys. Values are hex strings (`'#FBF9F4'`). |
16| `typography` | nested object | Each value: an object with any subset of `fontFamily`, `fontSize`, `fontWeight`, `lineHeight`, `letterSpacing`. |
17| `rounded` | object | Scale names (`sm`, `md`, `lg`, `xl`, `full`, `DEFAULT`) → CSS dimensions. `full` is conventionally `9999px`. |
18| `spacing` | object | Scale levels (`'1'`, `'2'`, ...) or named tokens (`gutter`, `margin-mobile`, `editorial-gap`) → dimensions. |
19| `components` | object | Component-name → object of component tokens mapped to values or `{path.to.token}` references. |
Frontmatter tokens
| Key | Type | Notes |
|---|---|---|
name | string | Required. Brand or system name. |
description | string | One-line statement of what this system is. |
colors | flat object | Kebab-case keys. Values are hex strings ('#FBF9F4'). |
typography | nested object | Each value: an object with any subset of fontFamily, fontSize, fontWeight, lineHeight, letterSpacing. |
rounded | object | Scale names (sm, md, lg, xl, full, DEFAULT) → CSS dimensions. full is conventionally 9999px. |
spacing | object | Scale levels ('1', '2', ...) or named tokens (gutter, margin-mobile, editorial-gap) → dimensions. |
components | object | Component-name → object of component tokens mapped to values or {path.to.token} references. |
21## Body sections (omittable, order-locked when present)
231. **Brand & Style** — Aesthetic posture in prose. The editorial voice — what *kind* of thing this is.
242. **Colors** — Per-color story. Why each exists, where it's used, what it's *not* used for.
253. **Typography** — Type roles, ramp, and rules. Platform conventions noted semantically when inherited.
264. **Layout & Spacing** — Spacing scale narrative, grid behavior, margins, gutters, breakpoint rules.
275. **Elevation & Depth** — Shadow language and tonal layering rules.
286. **Shapes** — Corner radii rules and the aesthetic logic behind them.
297. **Components** — Per-component visual specs: anatomy, color usage, sizing, state appearance.
308. **Do's and Don'ts** — Hard visual rules — what to do, what to avoid.
32Sections may be omitted when not relevant; order is locked when present.
Body sections (omittable, order-locked when present)
- Brand & Style — Aesthetic posture in prose. The editorial voice — what kind of thing this is.
- Colors — Per-color story. Why each exists, where it's used, what it's not used for.
- Typography — Type roles, ramp, and rules. Platform conventions noted semantically when inherited.
- Layout & Spacing — Spacing scale narrative, grid behavior, margins, gutters, breakpoint rules.
- Elevation & Depth — Shadow language and tonal layering rules.
- Shapes — Corner radii rules and the aesthetic logic behind them.
- Components — Per-component visual specs: anatomy, color usage, sizing, state appearance.
- Do's and Don'ts — Hard visual rules — what to do, what to avoid.
Sections may be omitted when not relevant; order is locked when present.
Raw lines 21 to 3334## Cross-reference syntax
36`{path.to.token}` used in prose and inside component objects to reference frontmatter tokens. Examples:
38- `{colors.primary}`
39- `{typography.body.fontSize}`
40- `{rounded.md}`
41- `{spacing.4}`
43The path follows the YAML structure.
Cross-reference syntax
{path.to.token} used in prose and inside component objects to reference frontmatter tokens. Examples:
{colors.primary}{typography.body.fontSize}{rounded.md}{spacing.4}
The path follows the YAML structure.
Raw lines 34 to 4445## Common patterns
47- **Light/dark mode.** Either separate kebab-case tokens (`surface-base` / `surface-base-dark`) or separate DESIGN.md files per mode. The spec allows either; pick the form that reads cleanest for the product.
48- **Platform conventions.** When inheriting from native platforms (iOS UIKit, Android Compose, Apple Human Interface Guidelines), use a `note` field instead of literal values: `{ note: 'iOS Title 1 · Android Headline Small' }`. The spec is the spec; the platform owns the rendered values.
49- **UI-system inheritance.** When inheriting from shadcn / MUI / Tailwind / internal design system, reference the system's tokens by name rather than restating values. DESIGN.md specifies only the deltas (brand color overrides, typography swaps, component customizations).
50- **Component tokens.** The `components` frontmatter entry maps each named component (e.g., `button-primary`) to its specific token values. Use `{path.to.token}` references freely; the resolver flattens at consumption time.
Common patterns
- Light/dark mode. Either separate kebab-case tokens (
surface-base/surface-base-dark) or separate DESIGN.md files per mode. The spec allows either; pick the form that reads cleanest for the product. - Platform conventions. When inheriting from native platforms (iOS UIKit, Android Compose, Apple Human Interface Guidelines), use a
notefield instead of literal values:{ note: 'iOS Title 1 · Android Headline Small' }. The spec is the spec; the platform owns the rendered values. - UI-system inheritance. When inheriting from shadcn / MUI / Tailwind / internal design system, reference the system's tokens by name rather than restating values. DESIGN.md specifies only the deltas (brand color overrides, typography swaps, component customizations).
- Component tokens. The
componentsfrontmatter entry maps each named component (e.g.,button-primary) to its specific token values. Use{path.to.token}references freely; the resolver flattens at consumption time.