Component library: build screens from tested parts
A component library is a collection of reusable, documented interface building blocks, such as buttons, inputs, cards and navigation, kept in sync between design files and code so teams assemble screens from tested parts.
Why teams use a component library
Without a library, every new screen is rebuilt from scratch and small differences pile up: five button styles, three date pickers, inconsistent error states. That slows designers and engineers and makes the product feel unfinished. A shared library means a fix to one component improves every screen that uses it.
It is also what makes AI-assisted building reliable. An agent that assembles pages from known components with clear rules produces consistent output; an agent that invents markup each time drifts. For a growing SaaS team, the library is where speed and quality stop being a trade-off.
How we handle it
We rarely start from zero. Most products are better served by an established library that already handles accessibility, keyboard support and edge cases: shadcn/ui or Radix for React products, MUI or Ant Design when a team already uses them, or the library your developers know. We pick the one that fits your stack and team, style it with your design tokens, and mirror it in Figma so design and code use the same parts.
On top of that base we add only what your product needs: we audit your real screens, merge duplicates and write the variants, states and usage rules for each component. Documentation sits next to each component, often in Storybook for product teams.
People decide which components exist and what the rules are; agents then draft new screens from the library, and a designer checks each one before you see the preview. It is part of our design system services, React development, product design and every larger website build, run as in our process.
Related service: Design systems · How we work
Component library in practice
A product team has 14 slightly different modal dialogs. The audit groups them into three real patterns: confirm, form and full-screen. Each becomes one component with documented sizes, focus behavior and keyboard support. Engineers replace the old modals over two sprints, and new features use the library version by default.
Common mistakes
- Building components nobody needs yet. Start with what the product uses most. Add components when a second use appears.
- Design and code drifting apart. Share tokens and names between Figma and code, and review both in the same change.
- Skipping states. Hover, focus, disabled, loading, error and empty states are the component. Design them all.
Popular component libraries to start from
Most teams start from an established component library and style it with their own tokens. Each name links to its docs.
| Library | Stack | Good for |
|---|---|---|
| shadcn/ui | React, Tailwind CSS | Products that want to own the component code and style it freely |
| Radix Primitives | React | Unstyled, accessible building blocks under a custom design |
| MUI | React | Teams that want a complete, styled set to theme |
| Ant Design | React | Data-heavy business apps with many tables and forms |
In code, a screen then uses the parts by name instead of new markup:
import { Button } from "@/components/ui/button";
<Button variant="secondary">Cancel</Button>Component library vs design system
A component library is one part of a design system. The system also holds the design tokens, principles, content rules and the process for changing them.
Build your own or start from one?
Start from one. An established library already handles accessibility, keyboard support and edge cases that take months to get right. Style it with your tokens, then add only the components your product needs, with your own usage rules on top.
Questions about component library
What is a component library?
Is a component library the same as a design system?
Should we use an off-the-shelf library?
Which component library does STRAK use?
What states should each component have?
Thomas OldenburgerFounder, design and build leadStill deciding? A 30-minute call answers most of it.
Related terms
Design system
A design system is the shared source of truth for how a product and its website are designed and built, combining design tokens, a component library, usage rules, content guidelines and a process for changing them.
Definition Design and UXDesign tokens
Design tokens are named, platform-agnostic values for design decisions, such as colors, type sizes, spacing, radii and motion timings, stored once and used by design tools and code so a change in one place updates everywhere.
Definition Design and UXPrototype
A prototype is an interactive model of a product or website, ranging from linked sketches to near-real screens or working code, built to test ideas with users and stakeholders before full development.
Definition