
Every product team eventually hits the same wall with a component library. The library's button is almost right, but the brand needs a different focus ring, a loading state and one extra variant. You fight its theming API, override its styles with ever more specific selectors, or fork it and lose upgrades. shadcn/ui takes a different route: instead of installing components you cannot touch, you copy their source code into your own project and own it from the first day.
This article explains what shadcn/ui is, how its copy-in model works, where it fits, where it does not, and how it compares with traditional component libraries.
What is shadcn/ui?
shadcn/ui is an open-source collection of React components, together with a command-line tool and a registry format for distributing them. Its own documentation sums up the idea in two sentences: "This is not a component library. It is how you build your component library."
With a conventional library you install a package from npm and import its components; the code lives in node_modules and changes only when the package does. With shadcn/ui, the CLI writes the component's TypeScript source into your repository, typically under components/ui. From then on the markup, the Tailwind CSS classes and the variants are your code, to edit, review and ship like anything else in the project.
The project was created by an engineer who goes by the handle shadcn and launched in January 2023, built on Radix UI primitives. It spread quickly through the React community, and its author later joined Vercel, which now supports it as an open-source project under the MIT licence. In July 2026 Base UI, a newer headless library from the team that originally built Radix, became the default for new projects; Radix remains fully supported.
How shadcn/ui works
Headless primitives underneath. Behaviour that is hard to get right, such as focus trapping in a dialog, keyboard navigation in a menu or ARIA attributes on a combobox, comes from a headless library: Radix UI or Base UI. shadcn/ui adds the styling and the composition on top.
Tailwind for styling, variants in code. Each component is styled with Tailwind utility classes. Variants such as default, outline or destructive on a button are defined with class-variance-authority (CVA), so adding a variant is a few lines in a file you already own. Colours, radii and fonts come from CSS variables, which makes theming and dark mode a matter of changing tokens.
A CLI and a registry. npx shadcn@latest init sets up a project and writes a components.json file with your paths and style choices. npx shadcn@latest add dialog then copies the dialog and its dependencies into the repository. The documentation has setup guides for Next.js, Vite, TanStack Start, React Router, Astro and Laravel, among others. The same flat-file registry schema lets any team publish its own components, so a company can distribute an internal design system the same way.
No upgrade path by design. Because the code is yours, there is no package version to bump. When shadcn/ui improves a component, you decide whether to pull the change and merge it, much like any other upstream code.
Key features
- Open code: every component's source is in your repository and open for modification.
- Accessible behaviour inherited from Radix UI or Base UI primitives, including keyboard support and focus management.
- Composable APIs: components share a predictable structure, such as
Dialog,DialogTriggerandDialogContent, so they combine cleanly. - Theming with CSS variables and built-in support for light and dark modes.
- Blocks: larger ready-made sections such as dashboards, sign-in screens and sidebars to copy as starting points.
- Distribution: a registry schema and CLI to share components across projects and teams.
- AI-ready code: plain, readable TypeScript and Tailwind that coding assistants can read and extend; the project also offers an MCP server for its registry.
Where shadcn/ui is used
- SaaS products and dashboards that need forms, tables, dialogs and navigation with a custom look.
- Company design systems, where shadcn/ui components are the starting point and the registry distributes the result to several apps.
- Marketing and product sites built with Next.js and React, where design control and performance both matter.
- Internal tools and admin panels that should look consistent without a dedicated design team.
- Prototypes generated with AI tools such as Vercel's v0, which is integrated with shadcn/ui and its registry.
When to choose shadcn/ui, and when not to
Choose shadcn/ui when:
- You build with React and Tailwind CSS, or are happy to adopt them.
- The product has its own design language and you expect to change components rather than accept a vendor's look.
- You want accessible primitives without writing keyboard and focus handling yourself.
- You plan to grow your own component library and want a strong first version of it.
Look elsewhere when:
- Your stack is not React. Unofficial community ports exist for other frameworks, but they are separate projects with their own pace.
- The team wants a complete library that is updated by version bumps and needs no ownership. A packaged library such as MUI or Mantine fits that expectation better.
- You need a broad set of enterprise components out of the box, such as complex data grids or schedulers. shadcn/ui gives you building blocks, not every widget.
- Nobody on the team will own the copied code. Components that drift without review become another legacy library.
shadcn/ui and its alternatives
| Option | Delivery | Styling | Best fit |
|---|---|---|---|
| shadcn/ui | Source copied into your repo | Tailwind CSS, CSS variables | Custom design systems on React |
| MUI | npm package | Material Design, theme API | Teams that accept Material conventions |
| Mantine | npm package | Own styling system | Feature-rich apps with fast setup |
| Radix UI / Base UI | npm package, headless | Bring your own | Teams writing every style themselves |
| Bootstrap | CSS and JS package | Predefined classes | Standard screens, server-rendered apps |
The real comparison is ownership versus convenience. A packaged library gives you more components and upgrades for free, but customising it means working through its API. shadcn/ui gives you less out of the box and asks you to maintain what you copy, in exchange for full control. Radix UI and Base UI sit one layer lower: they are the primitives shadcn/ui is built on, without any styling. Bootstrap solves a different problem: ready-made classes for teams that do not need a custom design.
How we use shadcn/ui at Internative
shadcn/ui is the foundation of the interfaces we ship, including the site you are reading, which is built with Next.js, shadcn/ui and Tailwind CSS. The components live in src/components/ui/, where we tune them to our design tokens. When a client asks for a completely custom design system, we start from shadcn/ui primitives and evolve them outward: weeks of foundational work are already done, and accessible behaviour is there from the first day.
Nevados, a platform that builds audit workpapers straight from the trial balance, is one of our published customer stories on this stack: a Next.js, React and TypeScript front end with shadcn/ui and Tailwind CSS, backed by .NET, MongoDB, Python and a self-hosted language model.
If you are planning a web product or need a design system turned into components your team can own, our web application development and UI design and visual systems teams can help.
Frequently asked questions
Is shadcn/ui a component library?
Not in the usual sense. You do not install it as a dependency and import from a package. You use its CLI to copy component source code into your project, and from then on the code is yours. Its documentation describes it as a way to build your own component library.
How do you install shadcn/ui?
Run npx shadcn@latest init in a React project to create the components.json configuration and base styles, then add components one at a time, for example npx shadcn@latest add button. The official site has step-by-step guides for Next.js, Vite, TanStack Start, React Router, Astro, Laravel and manual setups.
Is shadcn/ui built on Radix or Base UI?
Both are supported. shadcn/ui launched on Radix UI in January 2023. Since July 2026 new projects use Base UI by default, while Radix remains fully supported, so you choose the primitives when you initialise a project.
Is shadcn/ui free?
Yes. shadcn/ui is open source under the MIT licence and free to use in commercial projects. Because the code is copied into your repository, there is no runtime dependency on the project.
Is shadcn/ui one of the best UI libraries to use?
It is one of the most popular choices for React and Tailwind projects that need a custom design, but "best" depends on the team. If you want full control and are prepared to own the code, it fits well. If you want a complete, versioned package with many complex widgets, MUI or Mantine may suit you better.
Related services
Where this topic becomes an engagement.
Keep reading
The articles that follow this one.



