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 🙏

© 2025 – Pkg Stats / Ryan Hefner

shadcn-theme-editor

v2.0.0

Published

<div align="center">

Readme

🎨 Shadcn Theme Editor

Effortless Shadcn Theme Customization Made Simple

Manage Shadcn theme colors with an intuitive UI, adjust styles in real-time, and keep your design consistent without diving into raw CSS.


Next.js React TypeScript

GitHub last commit GitHub commit activity GitHub top language

npm bundle size NPM Version GitHub


📍 Overview

The Shadcn Theme Editor is a lightweight component designed to simplify theme customization in Shadcn projects.

  • 🎛 Visual UI for adjusting theme colors
  • Real-time preview of changes
  • 🌗 Supports light & dark mode via the html.dark class
  • 🛠 Works seamlessly with Shadcn components
  • 📦 Install as a dev dependency (recommended, due to bundle size)

This makes it a must-have dev tool for anyone building with shadcn/ui.


🚀 Installation

There are two ways to install shadcn-theme-editor:

  1. Via npm/yarn/pnpm/bun (as a dev dependency)
  2. Via Scaflo CLI (copies fully editable components)

Install the package as a development dependency:

# npm
npm install --save-dev shadcn-theme-editor

# yarn
yarn add --dev shadcn-theme-editor

# pnpm
pnpm add -D shadcn-theme-editor

# bun
bun add -D shadcn-theme-editor

The Scaflo CLI installs Shadcn Theme Editor as source components into your project, so you can fully customize them.

# pnpm (recommended)
pnpm dlx shadcn@latest add sheet button accordion
pnpm dlx [email protected] https://shadcnthemeeditor.vercel.app/r/editor.json -e %COMPONENTS%/shadcn-theme-editor

# or with npx
npx shadcn@latest add sheet button accordion
npx [email protected] https://shadcnthemeeditor.vercel.app/r/editor.json -e %COMPONENTS%/shadcn-theme-editor

# or with bun
bunx shadcn@latest add sheet button accordion
bunx [email protected] https://shadcnthemeeditor.vercel.app/r/editor.json -e %COMPONENTS%/shadcn-theme-editor

Follow the CLI prompts to generate and configure the components inside your own codebase.

⚠️ Note for Next.js: Add "use client"; to components/shadcn-theme-editor/index.tsx.


📖 Usage

Import the component and add it to your layout:

import ShadcnThemeEditor from "shadcn-theme-editor";

Load in Development Only

Exclude the editor from production builds:

let ShadcnThemeEditor: any;
if (process.env.NODE_ENV === 'development') {
  import('shadcn-theme-editor').then(module => {
    ShadcnThemeEditor = module.default; // or module, depending on the module's export
  });
} else {
  // eslint-disable-next-line react/display-name
  ShadcnThemeEditor = ()=>null
}

and use

<ShadcnThemeEditor />

🖼️ Screenshots

For detailed UI examples, see: usage.md

⚙️ Props

| Prop | Type | Default | Description | | ------------------ | ------------------------ | -------------------------------- | ------------------------------------------------------- | | side | "left" | "right" | "left" | Position of the editor sidebar. | | className | string | undefined | Extra CSS classes for the root element. | | triggerClassName | string | undefined | Extra CSS classes for the trigger button. | | title | string | "Shadcn Theme Editor" | Sidebar header text. | | customColors | Record<string, string> | undefined | Map of CSS vars → labels (e.g. --primary: "Primary"). | | getContainer | () => HTMLElement | () => document.documentElement | Element where dynamic styles will be injected. |

🙌 Special Thanks

📄 License

Licensed under the MIT License.