Frontend at organisation scale · senior
Design systems and component libraries
A design system is tokens, accessible primitives, components and patterns shipped as a versioned package with docs, and the hard parts are the component API, theming, versioning and getting teams to adopt it.
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceThe notes
What you must know
- Layers: design tokens (colour, spacing, type, radius) → primitives (Box, Text, Stack) → components (Button, Input, Dialog) → patterns (forms, empty states).
- Tokens as data: the W3C Design Tokens Community Group JSON format uses $value and $type with {group.token} aliases; a build step (e.g. Style Dictionary) outputs CSS variables, TypeScript and React Native values.
- Theming with CSS variables works with server components and streaming; runtime CSS-in-JS libraries struggle with RSC and add main-thread cost.
- Component API: few consistent props (variant, size, tone), composition (children, slots, asChild), controlled and uncontrolled modes, native props forwarded, ref as a normal prop in React 19.
- Accessibility built in: follow APG patterns or build on headless libraries (React Aria, Radix); test with axe in CI and with a screen reader.
- Distribution: a monorepo package, ESM with per-component entry points so tree-shaking works, CSS side effects declared, 'use client' only on interactive components.
- Versioning: semver with changesets, deprecation warnings, codemods for breaking changes, visual regression tests (Storybook + Chromatic or Playwright).
- Adoption: docs and playground, a contribution model, usage telemetry; Indian example: Razorpay's Blade design system.
The red pen
Common traps: mistake → fix
Mistake: A design system is a Figma file
Fix: it is code, tokens, docs and a process.
Mistake: Make every style configurable with props
Fix: prop explosion; prefer variants and composition.
Mistake: Breaking changes in a minor version
Fix: 40 apps break on their next install.
Mistake: It is only about looks
Fix: behaviour and accessibility are the biggest value.
Easy to hard
Questions interviewers ask, easy to hard
- How would you build a component library for all our product teams?
- How do you handle theming and dark mode?
- You need to change Button's API used by 40 apps. How?
- Design the API of an Input component (JioHotstar asked this).
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceYour first interview is free
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.