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 🙏

© 2024 – Pkg Stats / Ryan Hefner

pacmanui

v0.1.5

Published

A modern React UI component library with beautiful animations

Downloads

2

Readme

PacmanUI

A modern React UI component library with beautiful animations, built with Tailwind CSS and Framer Motion.

npm version Test Coverage License: MIT

Installation

# Using npm
npm install pacmanui

# Using pnpm
pnpm add pacmanui

# Using yarn
yarn add pacmanui

CLI Usage

Our CLI tool makes it easy to manage components:

# List all available components
npx pacmanui list

# Add a specific component
npx pacmanui add <component-name>

# Example: Add toast component
npx pacmanui add toast

The CLI will automatically:

  • Detect your package manager (npm/pnpm)
  • Install required dependencies
  • Copy component files to your project
  • Set up necessary configurations

Available Components

1. Accordion

import { Accordion } from '@/components/pacmanui/accordion'

function MyComponent() {
  const items = [
    { title: "Section 1", content: "Content for section 1" },
    { title: "Section 2", content: "Content for section 2" }
  ]

  return (
    <Accordion 
      items={items}
      variant="default" // 'default' | 'bordered' | 'rounded' | 'minimal' | 'card'
      allowMultiple={true}
    />
  )
}

2. Button

import { Button } from '@/components/pacmanui/button'

function MyComponent() {
  return (
    <Button 
      variant="primary" // 'primary' | 'secondary' | 'outline' | 'ghost'
      size="md" // 'sm' | 'md' | 'lg'
      onClick={() => console.log('clicked')}
    >
      Click Me
    </Button>
  )
}

3. DatePicker

import { DatePicker } from '@/components/pacmanui/date-picker'

function MyComponent() {
  const [date, setDate] = useState<Date | null>(null)

  return (
    <DatePicker
      selectedDate={date}
      onChange={(newDate) => setDate(newDate)}
      variant="default"
      animation="fade"
    />
  )
}

4. Modal

import { Modal, useModal } from '@/components/pacmanui/modal'

function MyComponent() {
  const { isOpen, open, close } = useModal()

  return (
    <>
      <button onClick={open}>Open Modal</button>
      <Modal
        isOpen={isOpen}
        onClose={close}
        title="My Modal"
        description="This is a description"
        size="md"
        variant="default"
      >
        <div>Modal content goes here</div>
      </Modal>
    </>
  )
}

5. Select

import { Select } from '@/components/pacmanui/select'

function MyComponent() {
  const options = [
    { value: "1", label: "Option 1" },
    { value: "2", label: "Option 2" }
  ]

  return (
    <Select
      options={options}
      placeholder="Select an option"
      multiple={false}
      searchable={true}
      onChange={(value) => console.log(value)}
    />
  )
}

6. Toast

import { Toast, useToast } from '@/components/pacmanui/toast'

function MyComponent() {
  const { showToast } = useToast()

  return (
    <button onClick={() => showToast({
      message: "Operation successful!",
      type: "success", // 'success' | 'error' | 'warning' | 'info'
      duration: 3000
    })}>
      Show Toast
    </button>
  )
}

Features

  • 🎨 Beautiful animations powered by Framer Motion
  • 🌙 Dark mode support out of the box
  • 📱 Fully responsive components
  • 🎯 Written in TypeScript with full type support
  • 🎭 Multiple variants for each component
  • ⚡ Lightweight and performant
  • 🔧 Highly customizable with Tailwind CSS
  • 📦 Tree-shakeable
  • 🛠️ Easy installation with CLI tool
  • ✅ Comprehensive test coverage (93.37%)

Test Coverage

-----------------|---------|----------|---------|---------|-------------------
File             | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
-----------------|---------|----------|---------|---------|-------------------
All files        |   93.37 |    86.42 |   95.23 |   93.37 |                   
 accordion.tsx   |      88 |    63.15 |    87.5 |      88 | 24,61-65          
 button.tsx      |     100 |      100 |     100 |     100 |                   
 date-picker.tsx |      86 |    78.37 |     100 |   85.41 | 109-121           
 modal.tsx       |     100 |      100 |     100 |     100 |                   
 select.tsx      |   97.91 |    91.83 |      95 |   97.77 | 60                
 toast.tsx       |   96.15 |      100 |   91.66 |     100 |                   
-----------------|---------|----------|---------|---------|-------------------

Requirements

  • React 18+
  • Tailwind CSS 3+
  • Node.js 16+

Dependencies

Core:

  • framer-motion: ^10.0.0
  • class-variance-authority
  • clsx
  • tailwind-merge

Component-specific:

  • date-fns (DatePicker)
  • lucide-react (Select)

Contributing

We welcome contributions! Please see our Contributing Guide for details.

License

MIT © themrsami