What This Template Is For
A design system without documentation is a Figma file that three people understand and nobody else trusts. Documentation is what turns a collection of components into a system that scales across teams. Good documentation answers four questions for every component: what it looks like (specs), when to use it (guidelines), how it behaves (states and interactions), and how to implement it (code).
This template provides a repeatable format for documenting each component in your design system. It covers visual specs (sizing, spacing, color tokens), usage guidelines (when to use and when not to use), variants and states, accessibility requirements, and code implementation notes. The same format works for atoms (buttons, inputs), molecules (search bars, cards), and organisms (navigation bars, data tables).
This pairs with the accessibility audit template for ensuring each component meets WCAG 2.1 AA standards and the design handoff template for communicating component usage to engineers. Teams evaluating their design system maturity can use the AI Design Maturity Model to benchmark where they stand. For broader design process documentation, the design review template provides a framework for reviewing new component proposals.
How to Use This Template
- Document one component at a time. Start with the most-used components (buttons, inputs, cards, modals) since those have the highest impact on consistency.
- Fill in the Component Overview first: name, description, status, and Figma link. This orients anyone discovering the component for the first time.
- Write the Usage Guidelines before the visual specs. Knowing when to use a component is more important than knowing its exact padding values.
- Document all variants and states, including edge cases (loading, error, disabled, empty, overflow). Missing states cause engineers to invent their own, breaking consistency.
- Include accessibility requirements as a core section, not an afterthought. Each component should specify keyboard behavior, ARIA attributes, contrast requirements, and screen reader announcements.
- Add code examples that show real usage, not abstract examples. Copy-pasteable code reduces implementation errors.
The Template
Component Overview
| Field | Details |
|---|---|
| Component Name | [Name, e.g., Button] |
| Category | Atom / Molecule / Organism |
| Status | Draft / Beta / Stable / Deprecated |
| Owner | [Designer and engineer responsible] |
| Figma Link | [Link to Figma component] |
| Storybook Link | [Link to Storybook page, if applicable] |
| Last Updated | [Date] |
| Version | [e.g., 2.1.0] |
Description. [1-2 sentences. What does this component do? What problem does it solve?]
Usage Guidelines
When to use:
- ☐ [Scenario where this component is the right choice]
- ☐ [Another appropriate scenario]
- ☐ [Context where this component solves a specific problem]
When NOT to use:
- ☐ [Scenario where a different component is better. Name the alternative.]
- ☐ [Anti-pattern or misuse that teams commonly attempt]
- ☐ [Edge case where this component breaks down]
Placement guidelines:
- [Where this component appears in the layout: page header, card footer, modal bottom, etc.]
- [How it relates to adjacent components: spacing from other elements, alignment]
- [Maximum count per view: e.g., "One primary button per view"]
Variants
| Variant | Use Case | Visual |
|---|---|---|
| Primary | [Main action on the page] | [Figma screenshot or description] |
| Secondary | [Supporting action] | [Visual] |
| Tertiary / Ghost | [Low-emphasis action] | [Visual] |
| Destructive | [Delete, remove, cancel] | [Visual] |
| Disabled | [Action not available] | [Visual] |
States
| State | Trigger | Visual Change | Notes |
|---|---|---|---|
| Default | Initial render | [Description] | |
| Hover | Mouse over | [Description] | Not applicable on touch devices |
| Focus | Keyboard Tab | [Description] | Must meet 3:1 contrast for focus indicator |
| Active / Pressed | Mouse down or Enter key | [Description] | |
| Loading | Async action in progress | [Description, e.g., spinner replaces label] | Disable interaction during loading |
| Disabled | Condition not met | [Description] | Use aria-disabled or disabled attribute |
| Error | Validation failure | [Description] | Pair with error message |
Design Tokens
| Property | Token | Value |
|---|---|---|
| Background (primary) | --color-primary | [e.g., #06b6d4] |
| Background (hover) | --color-primary-hover | [e.g., #0891b2] |
| Text color | --color-text-on-primary | [e.g., #ffffff] |
| Border radius | --radius-md | [e.g., 8px] |
| Font size | --font-size-sm | [e.g., 14px] |
| Font weight | --font-weight-medium | [e.g., 500] |
| Padding (horizontal) | --space-4 | [e.g., 16px] |
| Padding (vertical) | --space-2 | [e.g., 8px] |
| Min height | --min-height-button | [e.g., 36px] |
| Focus ring | --focus-ring | [e.g., 2px solid #3b82f6, offset 2px] |
Sizing
| Size | Height | Padding | Font Size | Use Case |
|---|---|---|---|---|
| Small (sm) | [e.g., 28px] | [e.g., 8px 12px] | [e.g., 12px] | Dense layouts, tables |
| Medium (md) | [e.g., 36px] | [e.g., 8px 16px] | [e.g., 14px] | Default, most contexts |
| Large (lg) | [e.g., 44px] | [e.g., 12px 24px] | [e.g., 16px] | Hero sections, onboarding |
Accessibility Requirements
- ☐ Keyboard: [Describe keyboard behavior, e.g., "Activates on Enter and Space. Tab to focus."]
- ☐ Screen reader: [Describe announcements, e.g., "Announces label + role ('Submit, button')"]
- ☐ ARIA: [Required ARIA attributes, e.g., "
aria-disabled='true'when disabled, notdisabledattribute on non-button elements"] - ☐ Contrast: [Minimum contrast ratios, e.g., "Text on primary: 4.6:1 (passes AA). Focus ring: 3:1."]
- ☐ Touch target: [Minimum size, e.g., "44x44px minimum for mobile (WCAG 2.5.8)"]
- ☐ Motion: [Animations respect
prefers-reduced-motion, e.g., "Loading spinner pauses when reduced motion is set"]
Content Guidelines
| Element | Guideline | Example |
|---|---|---|
| Label text | [Formatting rule] | [Good and bad examples] |
| Truncation | [How to handle overflow] | [Max length, truncation behavior] |
| Localization | [How to handle translated strings] | [Min/max label lengths tested] |
| Icons | [When to include, position] | [Left-aligned, 16px, with 8px gap] |
Code Examples
// Basic usage
<Button variant="primary" size="md" onClick={handleSubmit}>
Save Changes
</Button>
// With loading state
<Button variant="primary" loading>
Saving...
</Button>
// Destructive with confirmation
<Button variant="destructive" onClick={handleDelete}>
Delete Project
</Button>
// Icon + label
<Button variant="secondary" icon={<PlusIcon />}>
Add Item
</Button>
Props API:
| Prop | Type | Default | Description |
|---|---|---|---|
variant | [string enum] | 'primary' | Visual variant |
size | [string enum] | 'md' | Component size |
disabled | boolean | false | Disables interaction |
loading | boolean | false | Shows loading indicator |
icon | ReactNode | undefined | Optional icon element |
onClick | function | undefined | Click handler |
Related Components
| Component | Relationship |
|---|---|
| [Related component 1] | [How they differ or relate] |
| [Related component 2] | [How they differ or relate] |
| [Related component 3] | [How they differ or relate] |
Filled Example: Button Component
Component Overview
| Field | Details |
|---|---|
| Component Name | Button |
| Category | Atom |
| Status | Stable |
| Owner | Design: Jordan Lee, Eng: Alex Rivera |
| Figma Link | figma.com/file/design-system/button |
| Storybook Link | storybook.acme.dev/button |
| Last Updated | March 2026 |
| Version | 3.0.0 |
Description. Buttons trigger actions. They are the primary interactive element for user-initiated operations (submit, save, delete, navigate, toggle).
Usage Guidelines
When to use: Form submission, dialogs (confirm/cancel), page actions (create, export), navigation to a different context.
When NOT to use: Navigation within the same page (use a link instead). Toggling between states (use a toggle switch). Selecting from multiple options (use radio buttons or a select). If it navigates to a URL, use an tag styled as a button, not a .
Placement: One primary button per visible viewport. Place the primary action on the right in button groups. Destructive buttons go on the far left, separated by a spacer.
Accessibility
- ☑ Keyboard: Activates on Enter and Space. Focus ring visible on Tab.
- ☑ Screen reader: Announces label + role ("Save Changes, button"). Loading state adds
aria-busy="true". - ☑ Contrast: Primary text on background: 5.2:1. Destructive text on background: 4.8:1. Both pass AA.
- ☑ Touch target: 44x44px minimum on mobile (padding extends hit area even when visual size is smaller).
- ☑ Disabled state uses
aria-disabled="true"and explains why viaaria-describedbypointing to helper text.
Key Takeaways
- Document usage guidelines before visual specs. Knowing when to use a component matters more than its padding values
- Cover all states, including edge cases (loading, error, disabled, overflow, empty)
- Embed accessibility requirements as a core section, not a separate audit
- Include copy-pasteable code examples that show real usage patterns
- Assign a component owner responsible for keeping the documentation current
About This Template
Created by: Tim Adair
Last Updated: 3/4/2026
Version: 1.0.0
License: Free for personal and commercial use
