The definitions, then the useful part
A component library is a set of reusable, coded interface parts with defined APIs. A design system is the full set of decisions that governs how an interface looks and behaves — plus the artefacts that encode those decisions, one of which is usually a component library.
That is accurate and slightly useless, because it does not help you tell which one you have. Here is a test that does.
The test: hand a new engineer your system and ask them to build a screen you have not built yet. If everything they need a decision about is already decided — how dense, what elevation, which grey for a caption, whether that heading can be bold — you have a design system. If they have components and have to invent the rest, you have a component library.
Most teams fail that test and are surprised, because the component library felt like the hard part. It was the expensive part. It was not the part that determines whether the product looks like itself.
What sits in each
| Component library | Design system | |
|---|---|---|
| Contains | Button, Input, Dialog, Table, their props and variants | Colour roles, type scale, spacing scale, elevation strategy, motion, motifs, prohibitions, governance |
| Answers | How do I render a button? | Should there be a button here, which variant, and what goes around it? |
| Form | Code, versioned, installable | Decisions, written down, plus tokens |
| Changes when | A component gains a feature | The product's identity or audience changes |
| Without it | Every team rebuilds the same button, slightly differently | Every screen makes its own judgement calls, and they diverge |
| Failure looks like | Duplication and inconsistent behaviour | Consistent components arranged into a generic product |
That last row is the one worth reading twice. A component library's failure is visible — two date pickers, three button implementations, a bug fixed in one and not the other. A design system's failure is invisible from inside: everything is consistent, nothing is wrong, and the product could be anyone's.
Why installing a library can make things worse
Here is the counter-intuitive part. Adopting a well-made component library sometimes makes a product look *more* generic, not less, and it is worth understanding the mechanism rather than blaming the library.
A library ships with defaults. Those defaults are, by necessity, neutral — they have to work for thousands of unrelated products, so they encode the least opinionated version of every decision. Install it, and you have inherited a complete set of design decisions that were chosen specifically for being inoffensive.
A library's defaults are neutral by necessity. Adopt them wholesale and you have inherited a full set of decisions chosen for being inoffensive.
Before the library, the product had no system and looked inconsistent. After, it has a system and it is someone else's, tuned for maximum generality. The inconsistency is fixed and the identity problem has been created — and because the second problem produces no errors, it goes unnamed for a long time.
This is not an argument against component libraries. It is an argument that installing one completes half the job, and the half it completes is the one that was already visible.
Where style guides and pattern libraries fit
Several adjacent terms get used interchangeably. They are not synonyms; they are different slices.
| Covers | Missing | |
|---|---|---|
| Style guide | Visual standards: logo use, colours, type, imagery | Behaviour, composition, code. Usually a brand document |
| Pattern library | Recurring solutions: how a form validates, how empty states work | The values and roles underneath. Often has no tokens |
| Component library | Coded, reusable UI parts with APIs | Intent, prohibitions, composition guidance |
| Token set | Named values for colour, type, space, elevation | What each one is for, and what is forbidden |
| Design system | All of the above plus governance and intent | — |
A token set deserves particular attention because it is the artefact most often mistaken for a whole system. A file of named values is genuinely necessary and does not tell anyone what --color-primary is allowed to be used for — which is the decision that determines whether the interface reads as restrained or as a themed template.
What the system contains that the library cannot
Four things, none of which can live in a component's API, and all of which decide how the product looks.
- 1
Composition rules
How components sit together. One primary action per section. Related controls grouped, unrelated ones separated by a full spacing step. Tables never nested inside cards. A component library has no opinion about what surrounds its components, and the space between components is most of a screen.
- 2
Density and rhythm
Whether this is a dense tool or a spacious marketing surface. The same Button, at 8px padding in a table row and 16px in a hero, produces two different products. The library supports both and chooses neither.
- 3
Motifs
The recurring specific thing that makes the design yours — a particular corner treatment, a signature use of a rule line, a consistent way charts are drawn. Motifs are the difference between correct and characteristic, and they live nowhere in a component API.
- 4
Prohibitions
What is never done. No gradients. No shadow elevation. No font weight above 600. No colour outside the token set. A component library cannot forbid anything, because forbidding is the one thing a general-purpose library must not do.
The prohibition point generalises past design. A library's job is to be usable by many products, which means permitting everything reasonable. A system's job is to make one product coherent, which requires ruling most of that out. They are structurally opposed, which is why one cannot substitute for the other.
The difference is easiest to see on a single primitive. A component library gives you a Button with a variant prop and no opinion about what any variant should look like. A system decides — and the decision covers states the library only left a slot for:
Why this got expensive
The distinction was survivable when humans wrote every screen. A developer who had seen the last ten screens absorbed the unwritten conventions and mostly reproduced them. The design system existed in people's heads, undocumented, and that worked as long as the people stayed.
An AI coding agent has no such memory. It reads what is in the repository, writes a screen, and starts fresh. Everything the team knew and never wrote down is simply absent, and the agent fills the gap with the statistical average of everything it has seen — which is why AI-generated interfaces converge on the same look.
We sampled 299 DESIGN.md files written specifically to close that gap. The numbers say most of them do not: 86% specify colours as raw hex with no semantic role, 76% state no prohibitions at all, 57% define no motifs, 69% say nothing about dark mode, and 44% contain no concrete size value anywhere. 54% rely on at least one vague adjective, with "clean" in 39% and "modern" in 36%.
Read against the four items above, that is a corpus of files documenting the component library and calling it a design system. The composition rules, the density decision, the motifs and the prohibitions are mostly not there.
Adding the missing layer
The good news is that you do not have to rebuild anything. If you have a component library and tokens, the design system layer is a document, and it is short.
## Intent
A dense tool for people who work in it for hours. Quiet, information-first.
Not a marketing surface: nothing here has to convince anyone of anything.
## Density
Controls: 8-12px padding. Table rows: 32px. Section gap: 32px.
Marketing surfaces run one step up on every value.
## Elevation
A surface step plus a 1px border. Never a box-shadow.
## Composition
One primary action per section. Related controls share a group;
unrelated ones are separated by a full spacing step.
Tables are never nested inside cards.
## Motifs
Section headings carry a 2px accent rule on the left edge.
Numeric columns are always tabular-nums, always right-aligned.
## Never
- No gradients
- No drop shadows
- No font-weight above 600
- No colour value outside the token set
- No border-radius above 12pxThirty lines. It contains nothing your component library knows and everything a new engineer — or an agent — needs in order to build a screen that belongs to your product rather than to the library's defaults.
Identity Forge design kits are this layer, prebuilt and complete: 28 semantic colour roles across light and dark, type and spacing scales, elevation, motifs, and explicit do's and don'ts, serialised into a DESIGN.md that sits alongside whatever component library you already use. Browse the kits, or read what a DESIGN.md file is.
Which one do you need?
Almost always both, but the order depends on what is hurting.
| What you need first | |
|---|---|
| Three button implementations, bugs fixed in one | A component library. This is a code duplication problem |
| Consistent components, product looks like a template | A design system. The library is doing its job; nothing is expressing an identity |
| Every new screen makes different spacing choices | A design system — specifically the density and composition rules |
| AI-generated screens drift from each other | A design system, written to a file in the repository the agent reads |
| Designers and engineers use different names for things | A token layer with matching names across both tools |
What is the difference between a design system and a component library?
A component library is a set of reusable coded UI parts with defined APIs. A design system is the full set of decisions those parts express — colour roles, scales, elevation strategy, composition rules, motifs and prohibitions — along with the governance that keeps them true. The library is one output of the system.
Is shadcn/ui a design system?
It is a component distribution mechanism plus a token convention, which is a large part of the plumbing. It is not a design system for your product, because it does not decide your density, your composition rules, your motifs or what you forbid. Those decisions are what make output yours rather than the default.
Can I have a design system without a component library?
Yes, and it is common in early products or on teams using someone else's components. A written system plus a token layer over an off-the-shelf library works well. What does not work is the reverse — a library with no decided system leaves every judgement call to whoever writes the next screen.
Is a style guide the same as a design system?
No. A style guide typically covers visual brand standards — logo use, colours, type, imagery — and stops before behaviour, composition and code. It is one input to a design system rather than a substitute for one.
Why does my product still look generic after adopting a component library?
Because a library's defaults are neutral by design — they have to serve thousands of unrelated products. Adopting them wholesale means inheriting a complete set of decisions chosen for inoffensiveness. Adding density rules, composition rules, motifs and a prohibition list is what converts a library into a product identity.