1.0.8 • Published 5 months ago

create-vite-shadcn-app v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

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 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 */
}

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

1.0.8

5 months ago

1.0.7

6 months ago

1.0.6

6 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago