create-vite-shadcn-app Tailwind Templates

Create Vite Shadcn App

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.

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. New updates included

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 (optional)
    • 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
  • šŸ“¦ Support for npm, yarn, pnpm, and bun package managers

Quick Start

# 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

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
# or
bun run dev

Visit http://localhost:5173 to see your application.

Available Scripts

  • dev - Start the development server
  • build - Build for production
  • preview - Preview production build
  • lint - Lint your code

Customization

Adding New Components

  1. Visit shadcn/ui
  2. Choose a component
  3. Follow the installation instructions
  4. 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 */
}

Release Notes

v1.1.1 (Latest)

  • Added support for Bun package manager
  • Fixed container queries compatibility issue
  • Made container queries an optional feature
  • Improved error handling for package installation
  • Updated dependencies to latest versions

v1.0.10

  • Initial public release
  • Support for npm, yarn, and pnpm
  • Basic shadcn/ui components setup

License

MIT

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Acknowledgments

Bun Compatibility

This starter template is fully compatible with Bun, a fast JavaScript runtime and package manager. When using Bun:

  • Installation is faster due to Bun's optimized package resolution
  • Development server starts up quicker
  • Build times are reduced

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.

Bun-specific Commands

# Install dependencies
bun install

# Start development server
bun run dev

# Build for production
bun run build

# Preview production build
bun run preview

Top categories

Loading Svelte Themes