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

shru-design-system

v0.0.9

Published

A comprehensive design system with theme toggle, components, and token-based theming

Readme

Design System Repository

A comprehensive design system with 72+ reusable components and a theme management library. This monorepo contains both a Next.js showcase application and publishable npm libraries.

Purpose

A design system with 72+ reusable components and a theme management library. Includes both a Next.js showcase application and publishable npm libraries.

Key Features

Design System Components

  • 72+ Components organized by category (atoms, molecules, layout, primitives)
  • Radix UI Based - Accessible, unstyled primitives with custom styling
  • Tailwind CSS - Utility-first styling with CSS variables
  • TypeScript - Full type definitions for all components
  • Component Showcases - Live, interactive examples for every component

Theme System

  • Token-based Theming with multi-category support (color, typography, shape, density, animation)
  • Reusable Library - Theme toggle component and utilities published as shru-design-system
  • Zero CSS Imports - CSS variables generated and injected automatically
  • Dynamic Theme Switching - Runtime theme composition and application
  • Modular Architecture - Clean separation of UI, hooks, config, and utilities

Architecture

  • Module-based Structure - Clean separation of UI, hooks, config, and utils
  • Centralized Exports - Clean import paths with index.ts files
  • Atomic Design - Components organized by complexity and purpose

Installation

npm install shru-design-system
# or
pnpm add shru-design-system

Quick Start

// 1. Import CSS (required)
import '@shru/design-system/styles'

// 2. Import component
import { ThemeToggle } from 'shru-design-system'

function App() {
  return <ThemeToggle position="bottom-right" />
}

Note: You must import the CSS file - it contains Tailwind setup and base CSS variables. The theme system will dynamically override variables at runtime.

See USAGE.md for complete usage guide.

Build Process

# Build the library
npm run build:lib
# Generates: dist/index.js (ESM), dist/index.cjs (CJS), dist/index.d.ts (types)

# Run the showcase app
npm run dev
# Visit: http://localhost:3000/design-system

Project Structure

.
├── apps/
│   └── design-system/          # Next.js showcase application
│       ├── app/                # Routes (minimal)
│       ├── src/design-system/ # Component library & themes
│       ├── config/            # App configuration
│       ├── hooks/             # App-level hooks
│       ├── lib/               # Shared utilities
│       └── public/tokens/     # Design tokens (symlinked to src/tokens)
├── src/                        # Reusable library code
│   ├── tokens/                # Design tokens (JSON files)
│   └── index.ts               # Library entry point (re-exports from app's theme system)
├── dist/                       # Built library files (generated)
└── package.json                # Root package config

Documentation

Getting Started

  • USAGE.md - Complete usage guide: setup, theme toggle, components, how it works
  • CURSOR_PROMPT.md - Ready-to-use Cursor prompt for integrating the library

Advanced Topics

Contributing & Development

Contributing

Getting Started

  1. Clone and install:

    git clone <repo-url>
    npm install
  2. Run the showcase:

    npm run dev
  3. Make changes:

Development Workflow

  1. Make changes in appropriate module (components/, themes/, etc.)
  2. Test in the showcase app (npm run dev)
  3. If changing library code (src/), rebuild: npm run build:lib

License

MIT