A CLI tool to quickly scaffold a React application with Vite, Tailwind CSS, and shadcn/ui components. Get started with a fully configured development environment in seconds. New updates included
# Using npx
npx create-vite-shadcn-app my-app
# select one choice
it will give option to choose from npm, yarn, pnpm, or bun selection as you like
Or specify a name for your project:
npx create-vite-shadcn-app my-app
my-app/
āāā src/
ā āāā components/
ā ā āāā ui/ # shadcn/ui components
ā ā āāā ThemeToggle.jsx
ā āāā pages/
ā ā āāā Home.jsx
ā ā āāā Dashboard.jsx
ā āāā store/
ā ā āāā theme.js # Dark mode state
ā āāā lib/
ā ā āāā utils.js # Utility functions
ā āāā App.jsx
ā āāā main.jsx
āāā index.html
āāā jsconfig.json
āāā vite.config.js
āāā tailwind.config.js
āāā package.json
After creating your project:
cd my-app
# Start the development server
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun run dev
Visit http://localhost:5173
to see your application.
dev
- Start the development serverbuild
- Build for productionpreview
- Preview production buildlint
- Lint your codecomponents/ui
directoryEdit the CSS variables in src/index.css
to customize your theme:
:root {
--background: 0 0% 100%;
--foreground: 0 0% 3.9%;
/* ... other variables */
}
.dark {
--background: 0 0% 3.9%;
--foreground: 0 0% 98%;
/* ... other variables */
}
MIT
git checkout -b feature/amazing-feature
)git commit -m 'Add some amazing feature'
)git push origin feature/amazing-feature
)This starter template is fully compatible with Bun, a fast JavaScript runtime and package manager. When using Bun:
To use Bun with this template, select "bun" as your package manager during setup. If Bun is not installed, the CLI will attempt to install it for you.
# Install dependencies
bun install
# Start development server
bun run dev
# Build for production
bun run build
# Preview production build
bun run preview