Specify a Design System Component
Purpose
Define a component once, precisely enough that designers use it consistently and every platform team implements the same anatomy, states, tokens and accessibility behavior.
When to use
- A new pattern appears in two or more products and should become a shared component.
- An existing component is undocumented, inconsistently implemented or about to change.
- A contribution to the design system must be reviewed before it is accepted.
When not to use
- You are specifying one feature screen for implementation. Use
design-handoff.
- You are designing the code-level structure of a front-end component. Use
component-design.
- You need to audit existing UI for accessibility. Use
accessibility-audit.
Inputs
Required:
- The component name and the problem it solves (or examples of where it appears).
- Target platforms (web, iOS, Android, other).
Optional, improves quality:
- Existing token set and naming convention.
- Screenshots or descriptions of current divergent implementations.
- Related components it must coexist with or replace.
- Brand voice guidance for built-in content.
If name, problem or platforms are missing, ask. Other gaps become open questions.
Process
- State the component's job in one sentence and when it should be chosen over similar components (e.g. Toast vs. Banner vs. Dialog). Reject the component if an existing one covers the need; record that recommendation.
- Inventory current usages or examples, noting where they diverge; divergence drives the variant set, not taste.
- Define the anatomy: numbered parts, which are required and which optional, and nesting rules.
- Define variants (semantic, e.g. info/success/warning/error) and sizes. Keep each variant justified by a distinct use; drop decorative ones.
- Define states: default, hover, focus-visible, pressed, disabled, loading, selected, error, and any component-specific states (e.g. auto-dismissing, persistent).
- Map every part and state to design tokens (color, type, spacing, radius, elevation, motion). Use the team's naming; never invent tokens without marking
[PROPOSED TOKEN].
- Specify behavior: triggers, dismissal, timing, stacking/queuing, overflow and truncation, responsive and RTL behavior, reduced motion.
- Specify accessibility against WCAG 2.2 and the relevant WAI-ARIA Authoring Practices pattern: role, accessible name, keyboard interaction, focus management, announcements, contrast, target size.
- Write content rules: length limits, tone, capitalization, what never goes in the component; link to
microcopy.
- Write usage guidance as paired do/don't rules, plus the implementation API (props, events, slots) with defaults, and a versioning note for breaking changes.
- Mark inferences
[ASSUMPTION] and list open questions with owners.
- If the goal continues, suggest
component-design for the code implementation, design-handoff for the first feature using it, or accessibility-audit after build.
Output format
# Component: <Name>
| Field | Value |
|---|---|
| Status | Proposed / Beta / Stable / Deprecated |
| Platforms | ... |
| Replaces / related | ... |
## Purpose and When to Use
- Use when: ... - Use instead: <component> when ...
## Anatomy
1. <part> (required/optional) — ...
## Variants and Sizes
| Variant | Use for | Notes |
## States
| State | Visual change | Tokens | Behavior |
## Tokens
| Part | Property | Token |
## Behavior
- Trigger / dismissal / timing / stacking / overflow / RTL / reduced motion
## Accessibility
- Role / name / keyboard / focus / announcement / contrast / target size
## Content Rules
- ...
## Usage
| Do | Don't |
## API
| Prop / event | Type | Default | Description |
## Open Questions and Assumptions
- ...
Quality checklist
Common pitfalls
- Specifying visuals only. Components break on behavior (timing, focus, queuing), not color; spec behavior first.
- Variant explosion. Each variant multiplies maintenance; merge those without a distinct use.
- One platform's idioms forced onto all. Keep shared semantics, allow platform-native interaction where guidelines differ, and document it.
Example
Input: "Toast component for web and mobile; teams currently build their own."
Weak excerpt: "Toast: small popup at the bottom, disappears after a few seconds."
Strong excerpt:
- Use when: brief, non-blocking confirmation of a user action. Use Banner instead for persistent system status; Dialog when a decision is required.
- Behavior: auto-dismiss after
[TBD] seconds unless it contains an action; timer pauses on hover and focus; max 1 visible, others queue.
- Accessibility:
role="status" (error variant role="alert"); never moves focus; action reachable by keyboard.
1---2name: design-system-component-spec3description: "Specifies a reusable design system component with its purpose, anatomy, variants, sizes, states, design tokens, behavior, content rules, accessibility requirements, usage do's and don'ts, and API/props for implementation. Use when a new component is proposed for the design system, an existing one needs documentation or a breaking change, or teams are building divergent versions of the same pattern."4license: MIT5metadata:6 source: https://skillmd.com/skills/muratdincer/design-system-component-spec7 version: "1.0.0"8 language: en9 category: 10-design10 role: ux-ui-designer11 area: design12 title: "Specify a design system component"13 related: "design-handoff, wireframe-spec, component-design, accessibility-audit, microcopy"14 prompt: "Write a design system spec for a Toast notification component that web and mobile teams can both implement."15---1617# Specify a Design System Component1819## Purpose20Define a component once, precisely enough that designers use it consistently and every platform team implements the same anatomy, states, tokens and accessibility behavior.2122## When to use23- A new pattern appears in two or more products and should become a shared component.24- An existing component is undocumented, inconsistently implemented or about to change.25- A contribution to the design system must be reviewed before it is accepted.2627## When not to use28- You are specifying one feature screen for implementation. Use `design-handoff`.29- You are designing the code-level structure of a front-end component. Use `component-design`.30- You need to audit existing UI for accessibility. Use `accessibility-audit`.3132## Inputs33Required:34- The component name and the problem it solves (or examples of where it appears).35- Target platforms (web, iOS, Android, other).3637Optional, improves quality:38- Existing token set and naming convention.39- Screenshots or descriptions of current divergent implementations.40- Related components it must coexist with or replace.41- Brand voice guidance for built-in content.4243If name, problem or platforms are missing, ask. Other gaps become open questions.4445## Process461. State the component's job in one sentence and when it should be chosen over similar components (e.g. Toast vs. Banner vs. Dialog). Reject the component if an existing one covers the need; record that recommendation.472. Inventory current usages or examples, noting where they diverge; divergence drives the variant set, not taste.483. Define the anatomy: numbered parts, which are required and which optional, and nesting rules.494. Define variants (semantic, e.g. info/success/warning/error) and sizes. Keep each variant justified by a distinct use; drop decorative ones.505. Define states: default, hover, focus-visible, pressed, disabled, loading, selected, error, and any component-specific states (e.g. auto-dismissing, persistent).516. Map every part and state to design tokens (color, type, spacing, radius, elevation, motion). Use the team's naming; never invent tokens without marking `[PROPOSED TOKEN]`.527. Specify behavior: triggers, dismissal, timing, stacking/queuing, overflow and truncation, responsive and RTL behavior, reduced motion.538. Specify accessibility against WCAG 2.2 and the relevant WAI-ARIA Authoring Practices pattern: role, accessible name, keyboard interaction, focus management, announcements, contrast, target size.549. Write content rules: length limits, tone, capitalization, what never goes in the component; link to `microcopy`.5510. Write usage guidance as paired do/don't rules, plus the implementation API (props, events, slots) with defaults, and a versioning note for breaking changes.5611. Mark inferences `[ASSUMPTION]` and list open questions with owners.5712. If the goal continues, suggest `component-design` for the code implementation, `design-handoff` for the first feature using it, or `accessibility-audit` after build.5859## Output format60```markdown61# Component: <Name>62| Field | Value |63|---|---|64| Status | Proposed / Beta / Stable / Deprecated |65| Platforms | ... |66| Replaces / related | ... |6768## Purpose and When to Use69- Use when: ... - Use instead: <component> when ...7071## Anatomy721. <part> (required/optional) — ...7374## Variants and Sizes75| Variant | Use for | Notes |7677## States78| State | Visual change | Tokens | Behavior |7980## Tokens81| Part | Property | Token |8283## Behavior84- Trigger / dismissal / timing / stacking / overflow / RTL / reduced motion8586## Accessibility87- Role / name / keyboard / focus / announcement / contrast / target size8889## Content Rules90- ...9192## Usage93| Do | Don't |9495## API96| Prop / event | Type | Default | Description |9798## Open Questions and Assumptions99- ...100```101102## Quality checklist103- [ ] The spec states when to use a neighboring component instead.104- [ ] Every variant has a distinct use; every state has token mappings.105- [ ] Keyboard, focus, role and announcement behavior are specified.106- [ ] Behavior covers overflow, stacking, RTL and reduced motion.107- [ ] The API has defaults and names consistent across platforms.108- [ ] Proposed tokens and inferences are labeled; nothing is presented as existing that is not.109- [ ] All checks pass; if any fails, revise the output and re-run this checklist before answering.110111## Common pitfalls112- Specifying visuals only. Components break on behavior (timing, focus, queuing), not color; spec behavior first.113- Variant explosion. Each variant multiplies maintenance; merge those without a distinct use.114- One platform's idioms forced onto all. Keep shared semantics, allow platform-native interaction where guidelines differ, and document it.115116## Example117Input: "Toast component for web and mobile; teams currently build their own."118119Weak excerpt: "Toast: small popup at the bottom, disappears after a few seconds."120121Strong excerpt:122- Use when: brief, non-blocking confirmation of a user action. Use Banner instead for persistent system status; Dialog when a decision is required.123- Behavior: auto-dismiss after `[TBD]` seconds unless it contains an action; timer pauses on hover and focus; max 1 visible, others queue.124- Accessibility: `role="status"` (error variant `role="alert"`); never moves focus; action reachable by keyboard.