# shadcn

> Add components to your apps.

Latest version **4.22.1** (published 2026-10-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install shadcn
pnpm add shadcn
yarn add shadcn
bun add shadcn
```

Provides the command `shadcn`.

## Health

**Score 75/100 (B)** — status: active.

Positive: esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 4.22.1 |
| Published | 2026-10-18 |
| First published | 2024-07-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=20.18.1 |
| Dependencies | 32 |
| Unpacked size | 212.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 125912 |
| Author | shadcn |
| Maintainers | shadcn, npm_bot_shadcn |
| Keywords | components, ui, tailwind, radix-ui, base-ui, shadcn |

## Links

- npm: https://www.npmjs.com/package/shadcn
- Repository: https://github.com/shadcn-ui/ui
- Homepage: https://ui.shadcn.com
- Issues: https://github.com/shadcn-ui/ui/issues
- npm.io page: https://npm.io/package/shadcn

## Dependencies (32)

- [cn](https://npm.io/package/cn.md) ^0.2.4
- [ora](https://npm.io/package/ora.md) ^8.2.0
- [zod](https://npm.io/package/zod.md) ^4.2.0
- [diff](https://npm.io/package/diff.md) ^8.0.2
- [open](https://npm.io/package/open.md) ^11.0.4
- [execa](https://npm.io/package/execa.md) ^9.6.0
- [kleur](https://npm.io/package/kleur.md) ^4.1.5
- [socks](https://npm.io/package/socks.md) ^2.8.8
- [dedent](https://npm.io/package/dedent.md) ^1.6.0
- [recast](https://npm.io/package/recast.md) ^0.23.11
- [undici](https://npm.io/package/undici.md) ^7.29.1
- [postcss](https://npm.io/package/postcss.md) ^8.5.23
- [prompts](https://npm.io/package/prompts.md) ^2.4.2
- [fs-extra](https://npm.io/package/fs-extra.md) ^11.3.1
- [ts-morph](https://npm.io/package/ts-morph.md) ^26.0.0
- [commander](https://npm.io/package/commander.md) ^14.0.0
- [deepmerge](https://npm.io/package/deepmerge.md) ^4.3.1
- [fast-glob](https://npm.io/package/fast-glob.md) ^3.3.3
- [fuzzysort](https://npm.io/package/fuzzysort.md) ^3.1.0
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.28.0
- [browserslist](https://npm.io/package/browserslist.md) ^4.29.3
- [@babel/parser](https://npm.io/package/@babel/parser.md) ^7.28.0
- [tsconfig-paths](https://npm.io/package/tsconfig-paths.md) ^4.2.0
- [@dotenvx/dotenvx](https://npm.io/package/@dotenvx/dotenvx.md) ^1.48.4
- [@shadcn/registry](https://npm.io/package/@shadcn/registry.md) 0.2.0
- [stringify-object](https://npm.io/package/stringify-object.md) ^5.0.0
- [postcss-selector-parser](https://npm.io/package/postcss-selector-parser.md) ^7.1.6
- [@babel/preset-typescript](https://npm.io/package/@babel/preset-typescript.md) ^7.27.1
- [@modelcontextprotocol/sdk](https://npm.io/package/@modelcontextprotocol/sdk.md) ^1.32.0
- [validate-npm-package-name](https://npm.io/package/validate-npm-package-name.md) ^7.0.1
- [@types/validate-npm-package-name](https://npm.io/package/@types/validate-npm-package-name.md) ^4.0.2
- [@babel/plugin-transform-typescript](https://npm.io/package/@babel/plugin-transform-typescript.md) ^7.28.0

## Alternatives

- [@progress/kendo-ooxml](https://npm.io/package/@progress/kendo-ooxml.md) — 152.1K weekly downloads
- [@progress/kendo-react-ripple](https://npm.io/package/@progress/kendo-react-ripple.md) — 8.0K weekly downloads
- [@progress/kendo-react-orgchart](https://npm.io/package/@progress/kendo-react-orgchart.md) — 4.3K weekly downloads
- [@praxisui/dynamic-fields](https://npm.io/package/@praxisui/dynamic-fields.md) — 2.4K weekly downloads
- [@progress/kendo-vue-listbox](https://npm.io/package/@progress/kendo-vue-listbox.md) — 932 weekly downloads

## Recent versions

- 4.22.1 (latest) — 2026-10-18
- 0.0.0-beta-20261018062605 (beta) — 2026-10-18
- 0.0.0-rc-20261007105214 (rc) — 2026-10-07
- 4.2.0-canary.0 (canary) — 2026-04-07
- 4.22.0 — 2026-10-16
- 4.21.5 — 2026-10-14
- 4.21.4 — 2026-10-07
- 4.21.3 — 2026-10-06
- 0.0.0-beta-20261005184138 — 2026-10-05
- 0.0.0-beta-20261005183111 — 2026-10-05
- 0.0.0-beta-20261005172107 — 2026-10-05
- 4.21.2 — 2026-10-05
- 4.21.1 — 2026-10-01
- 0.0.0-beta-20261001093212 — 2026-10-01
- 4.21.0 — 2026-09-04
- … 297 more at https://npm.io/package/shadcn/versions

## README

# shadcn

A CLI for adding components to your project.

## create

Use the `create` command to create a new project. You will be taken to a website to build your custom design system and choose your framework.

```bash
npx shadcn create
```

## init

Use the `init` command to initialize dependencies for a new project.

The `init` command installs dependencies, adds the `cn` util, configures Tailwind CSS, and CSS variables for the project.

```bash
npx shadcn init
```

## apply

Use the `apply` command to apply a preset to an existing project.

The `apply` command overwrites the current preset configuration, reinstalls detected UI components, and updates fonts and CSS variables to match the new preset.

```bash
npx shadcn apply --preset a2r6bw
```

## add

Use the `add` command to add components to your project.

The `add` command adds a component to your project and installs all required dependencies.

```bash
npx shadcn add [component]
```

### Example

```bash
npx shadcn add alert-dialog
```

You can also run the command without any arguments to view a list of all available components:

```bash
npx shadcn add
```

## Documentation

Visit https://ui.shadcn.com/docs/cli to view the documentation.

## License

Licensed under the [MIT license](https://github.com/shadcn-ui/ui/blob/main/LICENSE.md).

---
_Source: https://npm.io/package/shadcn · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
