Prerequisites#
- Node.js
^20.19.0or>=22.12.0 npm,pnpm,yarn, orbunon yourPATH- Network access for
create-vite, your package manager, and the shadcn registry
Run the CLI#
Equivalent commands:
The interactive flow asks for:
- Project name and directory
- Package manager
- Tailwind CSS version — v4 (default) or v3
- shadcn/ui setup — interactive CLI or quickstart preset
- Starter Button + showcase demo
- Git repository initialization
Non-interactive example#
-y uses non-interactive defaults and refuses a non-empty target directory unless --force is passed.
After scaffolding#
Add more components with the command printed by the CLI:
For the legacy Tailwind v3 path, use npx shadcn@2.3.0 add dialog instead. See Tailwind v3.