npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

create-shadcn-js

v1.0.0

Published

Scaffold a Vite + React + shadcn/ui JavaScript project with zero manual configuration.

Readme

create-shadcn-js

Scaffold a fully configured Vite + React (JavaScript) + Tailwind CSS + shadcn/ui project in seconds — zero manual setup, zero config headaches.

npm version License: MIT


Why create-shadcn-js?

The official shadcn CLI only provides TypeScript templates (--template vite creates .tsx and tsconfig.json). If you build with JavaScript / JSX, setting up Vite with shadcn and Tailwind requires tedious manual work every single time:

  1. Creating jsconfig.json with baseUrl and @/* paths so both your editor and the CLI can resolve imports.
  2. Updating vite.config.js with path.resolve and @ path alias mapping.
  3. Installing and configuring Tailwind CSS (Tailwind v4 with @tailwindcss/vite and @import "tailwindcss"; in index.css, or v3 with tailwind.config.js and postcss.config.js).
  4. Purging default Vite boilerplate (conflicting App.css styling and SVGs).
  5. Configuring components.json with "tsx": false so shadcn generates .jsx and utils.js files rather than TypeScript.

create-shadcn-js takes care of all of this automatically with an interactive CLI powered by @clack/prompts.


Quick Start

Run any of the following in your terminal:

With npx:

npx create-shadcn-js@latest

With npm:

npm create shadcn-js@latest

With pnpm:

pnpm create shadcn-js

With bun:

bun create shadcn-js

Features

  • Vite + React (JavaScript): Fast HMR and build speeds using standard .jsx.
  • Tailwind CSS v4 & v3: Defaults to the new Tailwind CSS v4 (@tailwindcss/vite), with support for Tailwind CSS v3.
  • Seamless shadcn/ui Integration: Directly hands off to the official shadcn@latest init wizard so you can pick your preferred primitive library (Base UI, Radix UI, or React Aria), presets (Nova, Vega, etc.), and color palettes.
  • Auto-Configured Path Aliases: Generates jsconfig.json and updates vite.config.js with @/* mapping out of the box.
  • Clean Slate: Automatically removes conflicting default Vite styles and sets up a responsive index.html with clean typography.
  • Interactive Showcase Demo: Optionally installs a starter Button component and an interactive dark/light mode demo in src/App.jsx.
  • CLI Flags for CI/Automation: Supports non-interactive -y / --yes mode, preset flags, and custom package managers.

CLI Usage & Options

You can specify the project name directly or pass command-line options:

npx create-shadcn-js [project-name] [options]

Options:

| Flag | Description | Default | | --- | --- | --- | | [project-name] | Name of the project directory to create | Prompted (my-shadcn-app) | | --pm <manager> | Package manager to use (npm, pnpm, yarn, bun) | Auto-detected | | -t, --tailwind <v> | Tailwind version (v4 or v3) | v4 | | -m, --mode <mode> | Init mode (interactive or quickstart) | interactive | | -b, --base <base> | Component library (base, radix, aria) | User selection | | -p, --preset <preset> | Style preset (nova, vega, maia, etc.) | User selection | | -y, --yes | Skip interactive prompts and use recommended defaults | false | | -f, --force | Overwrite existing directory without confirmation | false | | --no-sample | Skip installing sample starter Button component | false | | --no-git | Skip initializing a Git repository | false | | -v, --version | Output CLI version | — | | -h, --help | Display help screen | — |

Examples:

1. Interactive Wizard (Recommended)

npx create-shadcn-js

2. Create in a Specific Directory

npx create-shadcn-js my-dashboard

3. Quick Non-Interactive Setup (Fast CI / Demo)

npx create-shadcn-js my-app -y

4. Custom Preset with pnpm and Tailwind v4

npx create-shadcn-js my-app --pm pnpm --base radix --preset nova -y

What the Generated Project Looks Like

my-shadcn-app/
├── index.html           # Pre-configured viewport and Geist font
├── jsconfig.json        # {"paths": {"@/*": ["./src/*"]}}
├── vite.config.js       # Vite config with @ alias & Tailwind v4 plugin
├── components.json      # Configured with "tsx": false for JavaScript
├── package.json
├── src/
│   ├── components/
│   │   └── ui/
│   │       └── button.jsx # (Optional starter component)
│   ├── lib/
│   │   └── utils.js     # cn() helper function
│   ├── App.jsx          # Interactive demo with Dark Mode toggle
│   ├── index.css        # Clean Tailwind CSS theme variables
│   └── main.jsx

Adding More Components

Once your project is created, simply cd into your project and use the official shadcn CLI as usual:

cd my-shadcn-app
npx shadcn@latest add dialog dropdown-menu input card avatar table

Components will automatically be added as .jsx files inside src/components/ui/!


Contributing

Contributions, issues, and feature requests are welcome!

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

License

MIT © 2026 create-shadcn-js