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

dandy-ui

v0.1.0

Published

TailwindCSS based UI component library

Downloads

94

Readme

Dandy UI

A modern, TypeScript-first UI component library built with TailwindCSS v4, featuring semantic design tokens, dark mode support, and Next.js compatibility.

Features

  • 🎨 TailwindCSS v4 - Latest Tailwind with @theme directive and @import syntax
  • 🌙 Dark Mode - Built-in dark mode support with semantic tokens
  • 📱 Responsive - Mobile-first responsive design
  • 🔧 TypeScript - Full TypeScript support with strict type checking
  • 🚀 Next.js Ready - Compatible with Next.js 13+ App Router, 14, and 15
  • 🌳 Tree Shakable - Only import what you need
  • 🎯 Semantic Tokens - CSS custom properties for consistent theming
  • Vite Powered - Fast development and optimized builds
  • 📦 Separate Theme - Theme CSS ships separately for flexible integration

Installation

npm install dandy-ui
# or
yarn add dandy-ui
# or
pnpm add dandy-ui

Peer Dependencies

Make sure you have the required peer dependencies installed:

npm install react react-dom tailwindcss @radix-ui/react-dialog @radix-ui/react-popover @radix-ui/react-select

Quick Start

1. Import CSS Files

Import the required CSS files in your app entry point (e.g., app.tsx, main.tsx, or _app.tsx):

// Import base styles (required - includes utilities & animations)
import "dandy-ui/base.css";

// Import theme variables (required - includes color tokens & design system)
import "dandy-ui/theme.css";

2. Configure TailwindCSS v4

With TailwindCSS v4, you no longer need a tailwind.config.js file. Instead, add the library content to your main CSS file where you import TailwindCSS:

/* In your main CSS file (e.g., globals.css or app.css) */
@import "tailwindcss";
@import "dandy-ui/theme.css";

@config "./path/to/your/app/**/*.{js,ts,jsx,tsx}";
@config "./node_modules/dandy-ui/dist/**/*.{js,ts,jsx,tsx}";

Or if you prefer to keep the theme separate, just ensure TailwindCSS can find the component files:

@import "tailwindcss";
@config "./src/**/*.{js,ts,jsx,tsx}";
@config "./node_modules/dandy-ui/dist/**/*.{js,ts,jsx,tsx}";

3. Use Components

import {
  Button,
  Card,
  CardContent,
  CardHeader,
  CardTitle,
  Text,
} from "dandy-ui";

function App() {
  return (
    <Card>
      <CardHeader>
        <CardTitle>Welcome to Dandy UI</CardTitle>
      </CardHeader>
      <CardContent>
        <Text className="mb-4">
          A beautiful component library built with TailwindCSS.
        </Text>
        <Button>Get Started</Button>
      </CardContent>
    </Card>
  );
}

Development

Prerequisites

  • Node.js 18+
  • npm/yarn/pnpm

Setup

  1. Clone the repository

  2. Install dependencies:

    npm install
  3. Start development server:

    npm run dev
  4. Build the library:

    npm run build

Available Scripts

  • npm run dev - Start development server with example components
  • npm run build - Build the library for production
  • npm run build:watch - Build in watch mode
  • npm run typecheck - Run TypeScript type checking
  • npm run preview - Preview the built library

Components

Layout

  • Container - Responsive container with max-width options
  • Card - Flexible card component with variants

Typography

  • Text - Styled text component with size and variant options
  • Heading - Semantic heading component (h1-h6)

Forms

  • Button - Button component with variants and states
  • Input - Form input with error states and variants

Design System

Semantic Tokens

The library uses CSS custom properties for consistent theming:

:root {
  --color-primary: 221.2 83.2% 53.3%;
  --color-background: 0 0% 100%;
  --color-foreground: 222.2 84% 4.9%;
  /* ... more tokens */
}

.dark {
  --color-background: 222.2 84% 4.9%;
  --color-foreground: 210 40% 98%;
  /* ... dark mode overrides */
}

Dark Mode

Toggle dark mode by adding the dark class to your root element:

// Toggle dark mode
document.documentElement.classList.toggle("dark");

Browser Support

  • Chrome 91+
  • Firefox 90+
  • Safari 14+
  • Edge 91+

Contributing

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

License

MIT © Nidhal Bettaibi