Working inside a design system
A system's value is that everything in it agrees. The expensive mistakes are not ugly components —
they are the private token, the one-off override and the sixth button variant, each individually
reasonable, which together turn a system back into a pile of CSS.
When this fires
The project already has tokens, a component library, a theme or a shared library, and you are
adding or changing UI inside it. It does not fire when there is no system and the decisions are
yours — that is frontend-design.
Procedure
Find the system before writing anything. Locate the token source, the component directory,
its documentation, and two or three real usage sites. Say where each lives. If the system is a
third-party library, read its current documentation rather than recalling its API — versions
move and a guessed prop is a silent fork.
Read the conventions you did not set: token naming and whether tokens are primitive or
semantic, how variants are expressed (props, classes, compound components), how theming and
dark mode resolve, file and export layout, and what the existing components already handle that
you were about to reimplement.
Take the highest rung that holds, in this order:
- An existing component, as it is.
- An existing component with an existing variant or prop.
- Existing primitives composed together.
- An existing component extended with a new variant.
- A new component in the system.
- A local one-off, explicitly marked as not part of the system.
Most work stops at rung 1 or 2. Reaching rung 5 for a single screen is almost always rung 3
misread.
Extend when the need is the same concept under a new condition and the component's API stays
coherent afterwards — a new size, a new tone of the same control. Add when it is genuinely a
different concept and at least two or three real, existing uses want it. One speculative use
is not a system component; build it locally and promote it when the second use arrives.
Never hardcode a value a token covers. If no token covers what you need, that gap is the
finding: report it and choose the nearest token, or ask. Inventing a private token beside the
system is how the system stops being one.
Treat a shared component as every screen that uses it. Before changing one, list its call
sites. Changing a default, renaming or removing a prop, or altering a token's value is a change
to all of them — stop and ask before doing it, and name the consumers in the question.
Follow the convention even where you disagree. Say your disagreement once, in the report,
and then match what is there. A locally better choice that breaks the pattern costs more than
it gains.
Render what you built inside the real system, not in isolation: every theme the system
ships, both a small and a large viewport, and the component's own states. Token and variant
changes are invisible in a diff and show up only on screen.
Document the addition where the system documents things — the same place, the same shape,
with a usage example and the case it is not for. An undocumented component is one somebody
reimplements next quarter.
Checklist
Failure handling
- No system is findable — say so before proceeding. Do not invent one mid-task; either the
work is
frontend-design, or the system exists somewhere you have not looked yet. Ask.
- The system contradicts itself — two patterns for the same thing. Follow the one in newer or
more numerous use, say which you followed and that the conflict exists. Do not resolve it by
adding a third.
- The design calls for something the system cannot express. Report the gap with the specific
case. Do not override the system to fake it; an override is invisible to the next reader and
survives longer than the reason for it.
- A token change looks right on your screen. It is not verified until rendered in each theme —
a value that reads well on light can fail contrast on dark.
- The system is owned by another team. Proposing a change to it is outward-facing work: prepare
it, stop, and let the user take it to them.
Evidence to report
Where the system lives — token file, component path, documentation. Which rung you took and what
ruled out the one above. Every token and component reused, by name. Any gap found. For a shared
change: the call sites, and the approval you were given. Screenshots per theme and viewport. State
plainly what was reused versus created, and whether the result was rendered or only built —
composed from system parts is not the same as seen working.
1---2name: design-systems3description: Build UI inside an existing design system — find its tokens and components, reuse before adding, decide between extending a component and introducing a new one, and preserve conventions you did not set. Use when a project already has design tokens, a component library, a theme or a shared Figma library and you are about to add or change UI inside it. Not for establishing a visual direction where no system exists, and not for reviewing an interface's usability.4---56# Working inside a design system78A system's value is that everything in it agrees. The expensive mistakes are not ugly components —9they are the private token, the one-off override and the sixth button variant, each individually10reasonable, which together turn a system back into a pile of CSS.1112## When this fires1314The project already has tokens, a component library, a theme or a shared library, and you are15adding or changing UI inside it. It does not fire when there is no system and the decisions are16yours — that is `frontend-design`.1718## Procedure19201. **Find the system before writing anything.** Locate the token source, the component directory,21 its documentation, and two or three real usage sites. Say where each lives. If the system is a22 third-party library, read its current documentation rather than recalling its API — versions23 move and a guessed prop is a silent fork.242. **Read the conventions you did not set**: token naming and whether tokens are primitive or25 semantic, how variants are expressed (props, classes, compound components), how theming and26 dark mode resolve, file and export layout, and what the existing components already handle that27 you were about to reimplement.283. **Take the highest rung that holds**, in this order:29 1. An existing component, as it is.30 2. An existing component with an existing variant or prop.31 3. Existing primitives composed together.32 4. An existing component extended with a new variant.33 5. A new component in the system.34 6. A local one-off, explicitly marked as not part of the system.3536 Most work stops at rung 1 or 2. Reaching rung 5 for a single screen is almost always rung 337 misread.384. **Extend when the need is the same concept under a new condition** and the component's API stays39 coherent afterwards — a new size, a new tone of the same control. **Add when it is genuinely a40 different concept** and at least two or three real, existing uses want it. One speculative use41 is not a system component; build it locally and promote it when the second use arrives.425. **Never hardcode a value a token covers.** If no token covers what you need, that gap is the43 finding: report it and choose the nearest token, or ask. Inventing a private token beside the44 system is how the system stops being one.456. **Treat a shared component as every screen that uses it.** Before changing one, list its call46 sites. Changing a default, renaming or removing a prop, or altering a token's value is a change47 to all of them — stop and ask before doing it, and name the consumers in the question.487. **Follow the convention even where you disagree.** Say your disagreement once, in the report,49 and then match what is there. A locally better choice that breaks the pattern costs more than50 it gains.518. **Render what you built inside the real system**, not in isolation: every theme the system52 ships, both a small and a large viewport, and the component's own states. Token and variant53 changes are invisible in a diff and show up only on screen.549. **Document the addition where the system documents things** — the same place, the same shape,55 with a usage example and the case it is *not* for. An undocumented component is one somebody56 reimplements next quarter.5758## Checklist5960- [ ] Token source, component directory and real usage sites located and named61- [ ] Existing components checked before anything new was written62- [ ] The chosen rung is named, and why the one above it did not hold63- [ ] No raw value used where a token exists; every gap reported rather than patched privately64- [ ] Call sites listed before any shared component or token was touched65- [ ] Shared-surface changes were asked about, not assumed66- [ ] Rendered in every theme and at two viewports67- [ ] New or extended components documented where the system documents things6869## Failure handling7071- **No system is findable** — say so before proceeding. Do not invent one mid-task; either the72 work is `frontend-design`, or the system exists somewhere you have not looked yet. Ask.73- **The system contradicts itself** — two patterns for the same thing. Follow the one in newer or74 more numerous use, say which you followed and that the conflict exists. Do not resolve it by75 adding a third.76- **The design calls for something the system cannot express.** Report the gap with the specific77 case. Do not override the system to fake it; an override is invisible to the next reader and78 survives longer than the reason for it.79- **A token change looks right on your screen.** It is not verified until rendered in each theme —80 a value that reads well on light can fail contrast on dark.81- **The system is owned by another team.** Proposing a change to it is outward-facing work: prepare82 it, stop, and let the user take it to them.8384## Evidence to report8586Where the system lives — token file, component path, documentation. Which rung you took and what87ruled out the one above. Every token and component reused, by name. Any gap found. For a shared88change: the call sites, and the approval you were given. Screenshots per theme and viewport. State89plainly what was reused versus created, and whether the result was rendered or only built —90composed from system parts is not the same as seen working.