Glossary · Design and UX

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 it matters

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.

Our approach

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

Example

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.

Avoid

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.
Options

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.

LibraryStackGood for
shadcn/uiReact, Tailwind CSSProducts that want to own the component code and style it freely
Radix PrimitivesReactUnstyled, accessible building blocks under a custom design
MUIReactTeams that want a complete, styled set to theme
Ant DesignReactData-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>
Compared

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.

Choice

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.

FAQ

Questions about component library

What is a component library?
A component library is a collection of reusable, documented interface building blocks, such as buttons, inputs and cards, kept in sync between design files and code.
Is a component library the same as a design system?
No. The component library is one part of a design system. The system also includes tokens, principles, content guidelines and the process for changing them.
Should we use an off-the-shelf library?
Usually, yes, as a base. Libraries such as shadcn/ui, Radix, MUI or Ant Design handle accessibility and edge cases that take months to get right yourself. Style them with your tokens and document your own usage rules on top.
Which component library does STRAK use?
Several. We choose per project, based on your stack and what your developers already use, rather than pushing one favorite.
What states should each component have?
Hover, focus, disabled, loading, error and empty, all designed. The states are the component, not an extra.
Thomas OldenburgerFounder, design and build lead

Still deciding? A 30-minute call answers most of it.

Got a brief, or half of one?

Book a free 30-minute call. You leave with a straight answer on scope, price and timing, even when we are not the right fit.