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

fancy-ui-lib

v1.0.0

Published

A modern React component library with TypeScript, TailwindCSS, and Radix Primitives

Readme

🎨 Fancy UI

A modern, accessible React component library built with TypeScript, TailwindCSS, and Radix Primitives.

✨ Features

  • 🎯 TypeScript First - Comprehensive type safety and IntelliSense support
  • 🎨 TailwindCSS Powered - Utility-first styling with full customization
  • 🌙 Dark Mode Support - Built-in dark mode with CSS variables
  • Accessible - WCAG compliant components built on Radix Primitives
  • 🛠️ Developer Experience - Tree-shakable, well-documented APIs
  • 🚀 Modern Build - ESM and CJS builds with Vite

📦 Installation

npm install @fancy-ui-lib/fancy-ui

🚀 Quick Start

import { Button, Input, Modal, DatePicker } from '@fancy-ui-lib/fancy-ui'
import '@fancy-ui-lib/fancy-ui/styles'

function App() {
  const [isModalOpen, setIsModalOpen] = useState(false)
  const [selectedDate, setSelectedDate] = useState<Date>()

  return (
    <div className="p-4 space-y-4">
      <Button onClick={() => setIsModalOpen(true)}>
        Open Modal
      </Button>
      
      <Input placeholder="Enter your name" />
      
      <DatePicker
        value={selectedDate}
        onChange={setSelectedDate}
        placeholder="Select a date"
      />
      
      <Modal
        isOpen={isModalOpen}
        onClose={() => setIsModalOpen(false)}
        title="Welcome"
        description="This is a sample modal"
      >
        <p>Modal content goes here!</p>
      </Modal>
    </div>
  )
}

🌙 Dark Mode Setup

Add the dark class to your document element to enable dark mode:

// Toggle dark mode
const toggleDarkMode = () => {
  document.documentElement.classList.toggle('dark')
}

// Or use a state-driven approach
useEffect(() => {
  if (isDark) {
    document.documentElement.classList.add('dark')
  } else {
    document.documentElement.classList.remove('dark')
  }
}, [isDark])

📚 Components

Button

A versatile button component with multiple variants and sizes.

import { Button } from '@fancy-ui-lib/fancy-ui'

// Variants
<Button variant="default">Default</Button>
<Button variant="secondary">Secondary</Button>
<Button variant="outline">Outline</Button>
<Button variant="ghost">Ghost</Button>
<Button variant="link">Link</Button>
<Button variant="destructive">Destructive</Button>

// Sizes
<Button size="sm">Small</Button>
<Button size="default">Default</Button>
<Button size="lg">Large</Button>
<Button size="icon">🎯</Button>

// States
<Button disabled>Disabled</Button>

Button Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | variant | 'default' \| 'secondary' \| 'outline' \| 'ghost' \| 'link' \| 'destructive' | 'default' | Button style variant | | size | 'sm' \| 'default' \| 'lg' \| 'icon' | 'default' | Button size | | asChild | boolean | false | Render as child element | | disabled | boolean | false | Disable the button |

Input

A styled input component with error state support.

import { Input } from '@fancy-ui-lib/fancy-ui'

<Input placeholder="Enter text" />
<Input type="email" placeholder="Enter email" />
<Input type="password" placeholder="Enter password" />
<Input error placeholder="Error state" />
<Input disabled placeholder="Disabled state" />

Input Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | error | boolean | false | Show error state styling | | type | string | 'text' | HTML input type | | placeholder | string | - | Input placeholder text | | disabled | boolean | false | Disable the input |

Modal

An accessible modal dialog built on Radix Dialog.

import { Modal } from '@fancy-ui-lib/fancy-ui'

const [isOpen, setIsOpen] = useState(false)

<Modal
  isOpen={isOpen}
  onClose={() => setIsOpen(false)}
  title="Modal Title"
  description="Modal description"
  size="md"
>
  <div className="space-y-4">
    <p>Your modal content here</p>
    <div className="flex justify-end gap-2">
      <Button variant="outline" onClick={() => setIsOpen(false)}>
        Cancel
      </Button>
      <Button onClick={() => setIsOpen(false)}>
        Confirm
      </Button>
    </div>
  </div>
</Modal>

Modal Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | isOpen | boolean | - | Control modal visibility | | onClose | () => void | - | Callback when modal closes | | title | string | - | Modal title | | description | string | - | Modal description | | size | 'sm' \| 'md' \| 'lg' \| 'xl' | 'md' | Modal size | | children | ReactNode | - | Modal content |

DatePicker

A date picker component built with react-day-picker and Radix Popover.

import { DatePicker } from '@fancy-ui-lib/fancy-ui'

const [date, setDate] = useState<Date>()

<DatePicker
  value={date}
  onChange={setDate}
  placeholder="Select a date"
/>

// With constraints
<DatePicker
  value={date}
  onChange={setDate}
  placeholder="Select future date"
  minDate={new Date()}
  maxDate={new Date(Date.now() + 365 * 24 * 60 * 60 * 1000)}
/>

DatePicker Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | value | Date | - | Selected date | | onChange | (date: Date \| undefined) => void | - | Date change callback | | placeholder | string | 'Pick a date' | Placeholder text | | disabled | boolean | false | Disable the picker | | minDate | Date | - | Minimum selectable date | | maxDate | Date | - | Maximum selectable date |

🎨 Customization

The library uses CSS variables for theming. You can customize the design by overriding these variables:

:root {
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --primary: 221.2 83.2% 53.3%;
  --primary-foreground: 210 40% 98%;
  /* ... other variables */
}

.dark {
  --background: 222.2 84% 4.9%;
  --foreground: 210 40% 98%;
  --primary: 217.2 91.2% 59.8%;
  --primary-foreground: 222.2 84% 4.9%;
  /* ... other variables */
}

🛠️ Development

# Install dependencies
npm install

# Start development server
npm run dev

# Build the library
npm run build

# Run linting
npm run lint

📄 License

MIT © Fancy UI Team

🤝 Contributing

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