How to Create a shadcn/ui Project with JavaScript Using One Command
Have you ever tried setting up shadcn/ui in a React + Vite project using JavaScript?
If yes, you might have noticed that many tutorials and starter configurations focus on TypeScript.
But not every React developer wants to use TypeScript. Some developers prefer plain JavaScript and JSX, especially when learning React or building projects with an existing JavaScript codebase.
The Problem
Setting up shadcn/ui in a React + Vite JavaScript project can involve several manual configuration steps:
- Creating a React + Vite project.
- Installing and configuring Tailwind CSS.
- Setting up import aliases.
- Configuring shadcn/ui.
- Making sure components are generated as JSX instead of TSX.
- Installing the required dependencies.
For developers who simply want to start building their UI, these setup steps can feel unnecessary.
The Solution: create-shadcn-js
To make this process easier, I created create-shadcn-js.
It's an npm package designed to help developers create a JavaScript-focused shadcn/ui project without going through the usual manual setup process.
Instead of configuring everything step by step, you can get started with just one command.
🚀 Create Your Project with One Command
Open your terminal and run:
npx create-shadcn-jsFollow the prompts to set up your project.
Once the setup is complete, you can start building your React application with JavaScript and shadcn/ui.
Why create-shadcn-js?
- JavaScript-focused shadcn/ui setup.
- React and Vite workflow.
- JSX instead of TSX.
- Simplified project initialization.
- Less time spent on initial configuration.
🔗 Check Out the Project
NPM Package:
https://www.npmjs.com/package/create-shadcn-js
GitHub Repository:
https://github.com/Skandan-V/create-shadcn-js
I'd Love Your Feedback!
This is a project I'm working on, and I'd love to hear feedback from the developer community.
- What features would you like to see?
- What improvements would make the setup better?
- Would you use this workflow for your next React project?
If you find it useful, consider giving the GitHub repository a ⭐.
Thanks for checking it out! Happy coding! 🚀