shadcn/ui vs Component Library
People think shadcn/ui is a component library, and its own docs say it is not. A component library is a package you install and upgrade, and its maker keeps the code. shadcn/ui copies the code for each part into your project. After that, the code is yours. You can change any line, but fixes made to the first copy will not reach yours.
shadcn/ui
Ready-made web parts. Their code is copied into your project, so it is yours.
shadcn/ui is an open source set of ready-made interface parts, like buttons and dialogs, for websites built with React. It says of itself that it is not a component library. You do not install it as one package. Instead, a command-line tool copies the code for each part into your own project. From then on the code is yours to change. It is styled with Tailwind CSS, and many teams use it as the base for their own library.
Component Library
The set of ready-made parts, like buttons. It lives in the design tool and in code.
A component library is the set of ready-made parts in a design system, like buttons, fields and cards. It exists twice: once in the design tool and once in code. The two should match by name and by how they act. Then the button in the design is the same button in the app. A library alone is not a full design system, which also needs rules and guidance.
In one line
- shadcn/ui
- Ready-made web parts. Their code is copied into your project, so it is yours.
- Component Library
- The set of ready-made parts, like buttons. It lives in the design tool and in code.