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

@tunjiadeyemi/ui

v1.4.1

Published

A collection of reusable UI components

Readme

@tunjiadeyemi/ui

A collection of reusable React UI components built with TypeScript.

Storybook

Explore all components in Storybook:

https://69a67d791bd8666f2b32dd2d-ujpylcgcxt.chromatic.com/

Installation

npm install @tunjiadeyemi/ui framer-motion lucide-react

or

yarn add @tunjiadeyemi/ui framer-motion lucide-react

Quick Start

Import styles once (for example in main.tsx or App.tsx):

import '@tunjiadeyemi/ui/styles.css';

Use the components:

import { useState } from 'react';
import { Modal, Input, Skeleton, Accordion, Rating, ScrollToTop } from '@tunjiadeyemi/ui';

function App() {
  const [showModal, setShowModal] = useState(false);
  const [email, setEmail] = useState('');

  return (
    <>
      <ScrollToTop />

      <Input
        type="email"
        value={email}
        onChange={(e) => setEmail(e.target.value)}
        placeholder="Enter your email"
        validate
      />

      <Accordion
        items={[
          { question: 'What is this?', answer: 'A reusable UI library.' },
          { question: 'Does it support TypeScript?', answer: 'Yes.' }
        ]}
      />

      <Rating rating={4} total={5} />
      <Skeleton width="200px" height="20px" animation="pulse" />

      <button onClick={() => setShowModal(true)}>Open Modal</button>
      <Modal
        showModal={showModal}
        onClose={() => setShowModal(false)}
        revealMode="fade"
        className="bg-white p-8 rounded-lg max-w-md"
      >
        <h2 className="text-2xl font-bold mb-4">Modal Title</h2>
        <p>Modal content goes here</p>
      </Modal>
    </>
  );
}

Components

Modal

Flexible modal component with multiple reveal animations.

Props

  • children: React.ReactNode
  • className?: string
  • revealMode?: 'fade' | 'slide-right' | 'slide-bottom' (default: 'fade')
  • showModal?: boolean (default: true)
  • onClose?: () => void
  • isDrag?: boolean (default: false)
<Modal
  showModal
  onClose={() => console.log('Modal closed')}
  revealMode="slide-bottom"
  isDrag
  className="bg-white p-6 rounded-lg"
>
  <h2>Your content</h2>
</Modal>

Input

Customizable input with validation, password visibility toggle, and OTP resend support.

Props

  • type?: 'password' | 'otp' | 'text' | 'email' | 'number'
  • value?: string
  • onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void
  • onOtpClick?: () => void
  • placeholder?: string
  • validate?: boolean (default: false)
  • minLength?: number
  • maxLength?: number
  • errorMessage?: string
  • className?: string
  • backgroundColor?: string (default: '#1F1F23')
  • borderColor?: string (default: '#6B2CE9')
  • textColor?: string (default: 'white')
  • borderRadius?: string (default: '10px')
  • height?: string (default: '40px')
  • width?: string (default: '100%')
  • eyeIcon?: React.ReactNode
  • eyeClosedIcon?: React.ReactNode
<Input
  type="email"
  value={email}
  onChange={(e) => setEmail(e.target.value)}
  placeholder="Enter your email"
  validate
  errorMessage="Please enter a valid email"
/>

Skeleton

Loading placeholder component with shape variants and animation options.

Props

  • className?: string
  • variant?: 'text' | 'circular' | 'rectangular' (default: 'rectangular')
  • width?: string | number (default: '100%')
  • height?: string | number (default: '100%')
  • animation?: 'pulse' | 'wave' | 'none' (default: 'pulse')
<Skeleton variant="text" width="200px" height="20px" />
<Skeleton variant="circular" width={50} height={50} />
<Skeleton variant="rectangular" width="100%" height="200px" animation="wave" />

Accordion

Simple accordion that supports multiple open items.

Types & Props

  • AccordionItem: { question: string; answer: React.ReactNode; icon?: React.ReactNode }
  • icon?: React.ReactNode
  • items: AccordionItem[]
  • className?: string
  • containerClassName?: string
  • onIconClick?: (idx: number, item: AccordionItem) => void
<Accordion
  items={[
    { question: 'What is this?', answer: 'An accordion item.' },
    { question: 'Can multiple items be open?', answer: 'Yes.' }
  ]}
/>

Rating

Rating display with default star icon or custom icon image.

Props

  • rating: number
  • total: number
  • icon?: string
  • showOnlyRated?: boolean (default: false)
<Rating rating={3} total={5} />
<Rating rating={4} total={5} icon="/icons/star.svg" />
<Rating rating={4} total={5} showOnlyRated />

ScrollToTop

Utility component that scrolls to top on mount and browser navigation events.

<ScrollToTop />

Development

# Install dependencies
npm install

# Build package (JS + types + styles)
npm run build

# Watch mode
npm run dev