Cheatsheet

Cheatsheet — Design Systems

Atomic Design Stage Decision Table

StageQuestion to askExample
AtomCan this be broken down further without losing function? If no → atom.Button, input, color token
MoleculeIs this a small group of atoms with exactly one clear purpose?Labeled search input
OrganismIs this a distinct, complex interface section (may repeat a molecule)?Header, product grid
TemplateIs this a full-page layout with placeholder content?Article page skeleton
PageIs this a template populated with real, representative content?The actual article page

If a component's job needs "and" to describe ("shows X and lets user edit Y"), it's probably not a molecule — split it or promote it to organism.

Token Layer Decision Rule

SituationUse
Defining a raw brand valuePrimitive token (blue-500)
Referencing a value from inside a componentSemantic token (color.action.primary)
Need per-theme values (light/dark, multi-brand)Semantic token that re-points per theme; primitives stay theme-agnostic

Never reference a primitive token directly from component code — always go through the semantic layer.

Component API Prop Vocabulary (adopt one, don't mix)

ConcernCommon prop nameValues
Visual stylevariantprimary / secondary / ghost / outline
Sizesizesm / md / lg
Semantic intent/colortone or colorneutral / danger / warning / success
State controlvalue + onChange (controlled) or defaultValue (uncontrolled)

Governance Model Trade-offs

ModelBest forRisk
Centralized (one core team owns everything)Small orgs, early-stage systemsBottleneck as org grows
Federated (feature teams contribute under review)Large orgs with many product teamsQuality drift without strong review criteria
Hybrid (core owns primitives, teams own product patterns)Most mid-to-large orgsRequires clear ownership boundary to avoid overlap disputes

Versioning Quick Rules

  • Patch: bug fix, no API/visual contract change.
  • Minor: new prop/component, backward compatible.
  • Major: breaking prop rename/removal, or a visual change that breaks a consumer's layout assumptions.
  • Always pair a deprecation with a concrete removal version — never leave it open-ended.

Accessibility Testing Layers (do all three, in this order)

  1. Automated (axe-core / Storybook a11y addon) — fast, catches a meaningful but partial subset (contrast, missing labels, invalid ARIA).
  2. Keyboard-only pass — tab through every interactive flow with no mouse; check focus order and visibility.
  3. Screen reader pass (VoiceOver/NVDA/JAWS) — the only layer that validates actual usability for assistive-technology users.

When to Reach for This Skill vs. an Implementation Skill

QuestionSkill
"How should I structure/name/govern my design system?"design-systems (this skill)
"What props does Radix Dialog accept?"radix-primitives-docs
"What props does Base UI Dialog accept?"base-ui-docs
"How do I style with Tailwind utility classes?"tailwind-docs
"What pre-styled shadcn components exist?"shadcn-ui-docs