Skip to content
BENIBIX Learn

shadcn/ui

Design📐 Design StandardsSystems and Libraries

Also known as shadcn, Shadcn UI

Ready-made web parts. Their code is copied into your project, so it is yours.

Think of it like

It is like a book of paper doll patterns. You trace the one you want, and then it is yours to color.

Example

Kai runs one command to add a button. The button's code lands in his project, and he changes its corners to match his brand.

Why it matters

Teams get a good start without being tied to someone else's design. They can change any line.

Definition

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.

Example code

bash
pnpm dlx shadcn@latest add button
The add command copies the button's code into your project. There is no package to update later.
shadcn/ui copies the code into your project. From then on you own it.

Common mistake

Waiting for fixes to arrive by themselves. The code was copied, so a later fix in the first copy never reaches yours.

Key takeaways

  1. 1
    Copy, not install. The code is yours.
  2. 2
    Open code. Change any line.
  3. 3
    A starting point. For your own library.

Compare