Component library
A component library is a reusable collection of UI components (buttons, inputs, modals, tables) shared across an app or team. By 2026 the 'copy-paste from repo' model (shadcn) and 'npm-install opinionated kit' models coexist.
In more detail
What it means
Three models in 2026: (1) npm-installed opinionated kits (MUI, Mantine, Chakra, Ant Design) — fast to start, hard to customize, version-locked; (2) headless primitives + Tailwind (Radix + custom styling, React Aria + Tailwind) — full control, more work; (3) copy-paste-into-repo (shadcn/ui, Park UI) — own the component code, edit freely, no version lock. The shadcn model exploded post-2023 because AI agents work better with code-in-repo (LLMs can see + edit components), and customization isn't blocked by upstream maintainers. Picking: npm-installed for prototype + admin; headless for highly custom product UI; shadcn / copy-paste for production with AI-assisted dev.
Part 1 of 2
When to use it, and when not
Use it for
- Any product UI of non-trivial size.
Part 2 of 2
Common mistakes
- Combining multiple component libraries — design system inconsistency.
- Picking npm-installed kit then heavily customizing — fights the library.
FAQ
Questions readers ask.
What is component library?
A component library is a reusable collection of UI components (buttons, inputs, modals, tables) shared across an app or team. By 2026 the 'copy-paste from repo' model (shadcn) and 'npm-install opinionated kit' models coexist.
When should you use component library?
Any product UI of non-trivial size.
What are the common mistakes with component library?
Combining multiple component libraries — design system inconsistency. Picking npm-installed kit then heavily customizing — fights the library.
Last updated: 2026-06-01. Raw markdown: https://promtable.com/glossary/component-library.md. Found a mistake? Tell us.