You have joined a company with roughly 40 product teams and 25 customer-facing web apps. Over the years each team has built its own buttons, modals and colour palettes. Most apps are React, two are Angular, and a marketing site is server-rendered with plain HTML. The company also sells a white-label version of its product, so at least three brands (plus light and dark modes) must be supported.
Leadership asks you to design the design-system platform: how tokens and components are authored, built, distributed, documented, tested, versioned and adopted, and how the system is governed over time.
Things the interviewer may add along the way:
Walk through requirements, architecture, the token and component contracts, the consumer-facing interfaces (packages, CLI, CI checks), and the trade-offs you would make, including how you would drive adoption and measure success.
A design system at this scale is not a component library. It is a product whose customers are other engineering teams, and the platform you design has to serve three different kinds of consumers: designers (Figma), engineers on the main stack (React), and engineers on everything else (Angular, server-rendered HTML, email, native). The most common failure mode is not bad components; it is a system that nobody adopts, or one that gets adopted and then freezes because nobody can upgrade it.
So the answer is organised around one idea: put the most portable layer (tokens) at the bottom, keep framework code thin on top of it, and invest heavily in the upgrade path.
| Consumer | What they need |
|---|---|
| Product designers | Figma library that matches code; tokens they can reference; clear usage guidance |
| React product teams (most apps) | Accessible components, good TypeScript types, tree-shakeable, SSR-safe |
| Angular teams, marketing site | Same visual language without a React runtime |
| White-label / brand team | Re-theme the whole product without forking components |
| Accessibility / legal | Evidence that core components meet WCAG 2.2 AA |
| Platform / performance team | Bounded bundle and CSS cost; no runtime style injection surprises |
The system has four layers, each consumable on its own:
One monorepo for the design system (pnpm workspaces plus Turborepo or Nx), publishing independently versioned
packages: @acme/tokens, @acme/css, @acme/react, @acme/icons, @acme/eslint-plugin, @acme/codemods. Changesets
drives versioning and changelogs. Product apps consume published packages from the private registry; they do not import
source from the design-system repo, which keeps the contract explicit.
Tokens are organised in tiers so brands can change values without changing meaning:
color.blue.600, space.4. Never used directly by components.color.action.primary.bg, color.text.danger, space.inset.md. This is
what brands and modes re-map.button.primary.bg. Use sparingly; every component token is API
surface you have to version.A DTCG-style source file:
{
"color": {
"action": {
"primary": {
"bg": {
"$type": "color",
"$value": "{color.blue.600}",
"$description": "Background of primary actions",
"$extensions": {
"com.acme": { "status": "stable", "since": "3.2.0", "figmaVariableId": "VariableID:12:34" }
}
}
}
}
}
}
Brands and modes are separate token sets resolved at build time into separate CSS scopes:
:root, [data-theme="acme-light"] { --acme-color-action-primary-bg: #1f5fd6; }
[data-theme="acme-dark"] { --acme-color-action-primary-bg: #7aa5ff; }
[data-theme="partnerx-light"] { --acme-color-action-primary-bg: #0b7a5a; }
Switching brand or mode is then an attribute change on a root element: no re-render, no JS bundle per brand, and it works identically in React, Angular and plain HTML.
Each component ships a machine-readable manifest alongside the code. It powers docs, the adoption scanner and deprecation warnings:
{
"name": "Button",
"package": "@acme/react",
"status": "stable",
"since": "1.0.0",
"a11y": { "pattern": "button", "wcag": ["2.1.1", "2.4.7", "1.4.3"], "audited": "2025-05-12" },
"tokens": ["color.action.*", "space.inset.*", "radius.control"],
"deprecatedProps": [{ "prop": "kind", "replacement": "variant", "removeIn": "6.0.0" }],
"owners": ["@acme/design-system-core"]
}
Status values (experimental, beta, stable, deprecated) are a promise: experimental can break in a minor,
stable follows strict semver.
Consistency across components matters more than the cleverness of any one API:
type Size = 'sm' | 'md' | 'lg';
interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {
variant?: 'primary' | 'secondary' | 'tertiary' | 'danger';
size?: Size;
loading?: boolean; // sets aria-busy, keeps width stable, disables activation
startIcon?: React.ReactNode;
endIcon?: React.ReactNode;
type?: 'button' | 'submit' | 'reset'; // defaults to "button", not the HTML default "submit"
asChild?: boolean; // render the child element (e.g. a router Link) with button styling
}
export const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
Conventions applied everywhere: refs forwarded to the DOM node, native attributes spread through, controlled and
uncontrolled modes (value/defaultValue/onValueChange), compound components for complex widgets
(<Tabs.List>, <Tabs.Panel>), and no className-based theming hooks beyond a single className escape hatch.
export function ThemeProvider(props: {
theme: 'acme' | 'partnerx' | 'partnery';
mode?: 'light' | 'dark' | 'system';
children: React.ReactNode;
}): JSX.Element; // sets data-theme on a wrapper; no runtime style computation
export const tokens: {
color: { action: { primary: { bg: 'var(--acme-color-action-primary-bg)' } } };
// generated: values are CSS var references, so they follow the active theme
};
npx @acme/ds doctor # checks versions, duplicate installs, peer deps, CSS import order
npx @acme/ds migrate --to 6 # runs jscodeshift codemods for the major, prints remaining manual TODOs
npx @acme/ds scan --report json # adoption scan: DS usage vs local look-alikes, deprecated props
CI checks offered to product repos as a reusable workflow:
@acme/eslint-plugin rules: no-deprecated-props, no-raw-color (flags hex values where a token exists),
prefer-ds-component (flags <button className="btn-primary">).| Layer | Options | Recommendation |
|---|---|---|
| Accessibility primitives | Build in house; React Aria (Adobe); Radix Primitives; Ark UI | Buy (open source). React Aria or Radix give tested keyboard and screen-reader behaviour. Owning focus traps, typeahead and collision-aware positioning yourself is years of bugs. |
| Styling | Runtime CSS-in-JS (Emotion, styled-components); zero-runtime (vanilla-extract, Panda CSS, CSS Modules); utility CSS (Tailwind with a token preset) | Zero-runtime. Runtime CSS-in-JS complicates RSC and streaming and costs main-thread time. CSS variables plus CSS Modules or vanilla-extract keep output portable. |
| Token pipeline | Style Dictionary; Tokens Studio; Figma variables REST API; Specify, Supernova | Style Dictionary (v4 supports DTCG) for builds; Figma variables as the designer-facing source, synced via API. |
| Docs | Storybook; Docusaurus or a custom Next.js site; zeroheight, Supernova | Storybook for component docs and as the test harness; a custom site only if marketing-quality docs are required. |
| Visual testing | Chromatic; Percy; self-hosted Playwright screenshots | Chromatic if budget allows (tight Storybook integration, review UI); Playwright snapshots if not, accepting flakiness work. |
| Wholesale library | MUI, Chakra, Mantine with a theme | Viable for a small org. At 3 brands and 40 teams you eventually fight the library's opinions, so wrap the headless layer instead. |
The guiding rule: own the API and the visual language, buy the behaviour. Consumers import @acme/react, never
Radix directly, so you can swap the underlying primitive without a breaking change.
Three realistic options for the Angular apps and marketing site:
ElementInternals. Shadow DOM also blocks global token styles unless tokens are CSS custom properties (which do
inherit through the shadow boundary, another reason to use them).For a React-majority org I would pick option 1 plus selective option 2 for a handful of complex widgets the Angular teams actually need (DatePicker, Combobox), not a full parallel library.
console.warn in development builds only, plus the lint rule).ds doctor and a CI check fail on duplicate @acme/react versions because
duplicate React contexts silently break theming and portals.data-ds attribute sampled in RUM.Avoid vanity metrics like "number of components". More components increase maintenance cost.
sideEffects declared (CSS files listed) so bundlers tree-shake unused components.@acme/labs package marked experimental, then graduate after review, docs and a11y audit. This scales better
than either a pure central team (bottleneck) or a pure open-source free-for-all (inconsistency).How do you keep Figma and code in sync? Make Figma variables and the token repo bi-directionally synced via the Figma REST API (or Tokens Studio), with the repo as the reviewed source of truth: designer changes open a PR, CI shows contrast checks and visual diffs, and merging publishes. For components, align names and variant props and use Code Connect so Dev Mode shows real code.
A team says the Button doesn't fit their use case and wants to fork it. What do you do?
Understand the need first. Usually it is a missing variant or composition point. Offer an escape hatch (asChild,
slots, className) for the immediate case and open an RFC for the general one. If forking is truly necessary, have
them build on the same headless primitive and tokens so it still themes correctly, and track it in the scanner.
Monorepo or separate repos for the design system? A separate design-system monorepo publishing versioned packages is usually better than placing it inside a company mega-monorepo with source imports, because versions give slow teams an upgrade buffer. If the company already runs everything in one monorepo with trunk-based upgrades, you must instead invest in codemods you run yourself across all apps, since everyone is always on HEAD.
How would you handle dark mode?
Semantic tokens re-mapped per mode, switched via a data-theme attribute, with color-scheme set so native form
controls and scrollbars follow. Set the attribute before first paint (inline script reading a cookie or
prefers-color-scheme) to avoid a flash.
Runtime CSS-in-JS is already used by half the apps. Migrate? Not as a big bang. Make the DS output zero-runtime CSS that coexists with Emotion; apps can keep their own Emotion code. Measure INP and SSR cost before pushing app teams to migrate.
How do you prove the design system is worth the headcount? Pair adoption data with outcomes: reduced a11y defects, faster delivery of a recent rebrand (for example, a brand change that took one PR instead of a quarter), fewer duplicate components, and developer survey results.
Spotted a mistake or a rights concern? Report an issue