1.0.8 ⢠Published 5 months ago
create-vite-shadcn-app v1.0.8
create-shadcn-starter
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.
Features
- š Vite for fast development and building
- šØ shadcn/ui components pre-configured with latest versions
- š Dark mode support out of the box
- šÆ Tailwind CSS v4 with advanced features:
- Container queries support
- Typography plugin
- Enhanced responsive design
- š± Modern responsive design with latest Tailwind features
- š§ React Router for navigation
- š¦ Zustand for state management
- ā”ļø Example components and pages included
- š§ connects to git
Quick Start
# Using npx
npx create-vite-shadcn-app my-app
# select one choice
it will give option to choose from yarn pnpm, npm selection as you like
Or specify a name for your project:
npx create-vite-shadcn-app my-app
What's Included
- Configured project structure
- Pre-built components from shadcn/ui
- Dark mode toggle
- Example pages (Home and Dashboard)
- React Router setup
- State management with Zustand
- Tailwind CSS configuration
- Ready-to-use development environment
Project Structure
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
Development
After creating your project:
cd my-app
# Start the development server
npm run dev
# or
yarn dev
# or
pnpm dev
Visit http://localhost:5173
to see your application.
Available Scripts
dev
- Start the development serverbuild
- Build for productionpreview
- Preview production buildlint
- Lint your code
Customization
Adding New Components
- Visit shadcn/ui
- Choose a component
- Follow the installation instructions
- The component will be added to your
components/ui
directory
Modifying Theme
Edit 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 */
}
License
MIT
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request