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

shadcn-themes

v1.0.3

Published

A comprehensive theme library for shadcn/ui with 30+ pre-built themes using OKLCH color space

Readme

🧩 shadcn Themes

A comprehensive, context-based theme library for shadcn/ui with 30+ pre-built themes using the OKLCH color space.


✨ Features

  • 🎨 30+ pre-made themes – from classic dark/light to app-inspired designs (GitHub, VS Code, Dracula, etc.)
  • 🌈 OKLCH colors – modern color space for perceptually uniform colors and better accessibility
  • ⚙️ Context-based API – use ThemeProvider and useTheme for seamless integration
  • 🧠 Fully type-safe – complete TypeScript support with exported types
  • 🧩 Customizable – built-in theme editor with hue/saturation controls
  • 🧘 Flexible – use a floating switcher or build custom theme UIs
  • 💾 Persistent – automatic localStorage support for theme preferences
  • 📤 Exportable – copy theme CSS variables for any theme

First Step

Initialize a shadcn/ui Project

📦 Installation

npm install shadcn-themes
# or
pnpm add shadcn-themes
# or
yarn add shadcn-themes

⚡ Quick Start

1️⃣ Setup ThemeProvider

Wrap your app:

import { ThemeProvider } from "shadcn-themes";

function App() {
  return (
    <ThemeProvider defaultTheme="dark" storageKey="app-theme">
      {/* Your app components */}
    </ThemeProvider>
  );
}

2️⃣ Use the useTheme Hook

Access themes anywhere:

import { useTheme } from "shadcn-themes";

function ThemeSwitcher() {
  const { themes, currentTheme, setTheme } = useTheme();

  return (
    <select
      value={currentTheme?.value ?? ""}
      onChange={(e) => setTheme(e.target.value)}
    >
      {themes.map((theme) => (
        <option key={theme.value} value={theme.value}>
          {theme.name}
        </option>
      ))}
    </select>
  );
}

3️⃣ Optional: Floating Switcher

Drop-in floating theme switcher:

import { ThemeProvider, ThemeSwitcher } from "shadcn-themes";

function App() {
  return (
    <ThemeProvider defaultTheme="dark" storageKey="app-theme">
      {/* Your app */}
      <ThemeSwitcher />
    </ThemeProvider>
  );
}

🎨 Available Themes

Classic: Dark, Light, Midnight, Ocean, Forest, Sunset, Rose, Amber, Violet, Slate, Emerald, Sky, Crimson

App-inspired: VS Code, Slack, X (Twitter), GitHub Dark, GitHub Light, Discord, Notion, Linear, Spotify, Dracula, Nord, Solarized Light, Monokai, Jira Dark, Trello Dark


🧰 API Reference

<ThemeProvider />

<ThemeProvider defaultTheme="dark" storageKey="app-theme">
  {children}
</ThemeProvider>

🔧 Advanced Usage

🧱 Build a Custom Switcher

import { useTheme } from "shadcn-themes";
import { Button } from "@/components/ui/button";

function CustomThemeSwitcher() {
  const { themes, currentTheme, setTheme } = useTheme();

  return (
    <div className="grid gap-2">
      {themes.map((theme) => (
        <Button
          key={theme.value}
          variant={currentTheme?.value === theme.value ? "default" : "ghost"}
          onClick={() => setTheme(theme.value)}
        >
          {theme.name}
        </Button>
      ))}
    </div>
  );
}

🎛️ Custom Accent Controls

import { useTheme } from "shadcn-themes";
import { Slider } from "@/components/ui/slider";

function ThemeEditor() {
  const { customTheme, setCustomTheme } = useTheme();

  return (
    <div className="space-y-4">
      <div>
        <label>Hue: {customTheme.hue}°</label>
        <Slider
          value={[customTheme.hue]}
          onValueChange={([hue]) => setCustomTheme({ ...customTheme, hue })}
          min={0}
          max={360}
        />
      </div>
      {/* Add controls for saturation/brightness if desired */}
    </div>
  );
}

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

🔗 Links


Built with ❤️ using OKLCH color space for shadcn/ui