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

@nudgelabs/design-theme

v0.2.0

Published

Shared shadcn/ui theme CSS variables for Tailwind v4

Readme

@nudgelabs/design-theme

A shared shadcn/ui theme package for Tailwind CSS v4 that provides CSS variables and @theme inline configuration for consistent theming across projects.

What's Included

  • CSS Variables - Complete shadcn/ui color tokens in OKLCH format for light/dark modes
  • @theme inline - Pre-configured Tailwind v4 theme mapping
  • Dark Mode Variant - @custom-variant dark for class-based dark mode
  • Base Styles - Border, background, and cursor defaults

Installation

pnpm add @nudgelabs/design-theme tailwindcss@^4.0.0 tw-animate-css

Usage

Configure globals.css

In your globals.css, import Tailwind and the theme:

@import "tailwindcss";
@import "tw-animate-css";
@import "@nudgelabs/design-theme/styles.css";

That's it! No tailwind.config.ts needed for theming - it's all CSS-based with Tailwind v4.

Configure PostCSS

// postcss.config.mjs
export default {
  plugins: {
    "@tailwindcss/postcss": {},
  },
};

Enable Dark Mode

The theme uses the class strategy. Add the dark class to <html>:

// Using next-themes
import { ThemeProvider } from "next-themes";

<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
  {children}
</ThemeProvider>

Add shadcn/ui Components

npx shadcn@latest add button card input dialog

Components automatically use the theme variables.

CSS Variables Reference

All colors use the OKLCH color format for better perceptual uniformity.

Colors

| Variable | Description | |----------|-------------| | --background | Page background | | --foreground | Default text color | | --card / --card-foreground | Card colors | | --popover / --popover-foreground | Popover colors | | --primary / --primary-foreground | Primary brand color | | --secondary / --secondary-foreground | Secondary color | | --muted / --muted-foreground | Muted/subtle colors | | --accent / --accent-foreground | Accent highlights | | --destructive / --destructive-foreground | Error/danger states | | --border | Border color | | --input | Input border color | | --ring | Focus ring color | | --chart-1..5 | Chart palette | | --sidebar-* | Sidebar-specific colors |

Other Variables

| Variable | Default | |----------|---------| | --radius | 0.625rem |

Customizing

Override Variables

Add custom values after importing the theme:

@import "tailwindcss";
@import "tw-animate-css";
@import "@nudgelabs/design-theme/styles.css";

:root {
  --primary: oklch(0.6 0.2 250);
  --radius: 0.75rem;
}

.dark {
  --primary: oklch(0.7 0.2 250);
}

Variables Only (No @theme inline)

If you need just the CSS variables without the Tailwind configuration:

@import "tailwindcss";
@import "@nudgelabs/design-theme/theme.css";

/* Add your own @theme inline block */
@theme inline {
  --color-background: var(--background);
  /* ... */
}

Exports

| Export | Description | |--------|-------------| | @nudgelabs/design-theme/styles.css | Full theme (variables + @theme inline) | | @nudgelabs/design-theme/theme.css | Variables only |

Key Differences from Tailwind v3

| Tailwind v3 | Tailwind v4 | |-------------|-------------| | tailwind.config.ts | @theme inline in CSS | | @tailwind base/components/utilities | @import "tailwindcss" | | tailwindcss-animate | tw-animate-css | | HSL colors | OKLCH colors | | darkMode: ["class"] | @custom-variant dark |

License

MIT