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

shubh-ui

v0.2.1

Published

Reusable React UI component library built with TypeScript, Tailwind CSS, and tsup.

Readme

shubh-ui

Reusable React UI component library built with TypeScript, Tailwind CSS, and tsup.

Install

npm install shubh-ui

Peer dependencies (required by consumer app):

npm install react react-dom

Tailwind Requirement

This package uses Tailwind utility classes and does not bundle Tailwind. Consumers must configure Tailwind in their React/Next.js app.

Usage

import { Button, Input, Label, Card, Navbar, Sidebar } from "shubh-ui";

export function Example() {
  return (
    <Card>
      <Label htmlFor="email" required>
        Email
      </Label>
      <Button variant="primary" size="lg" loading={false}>
        Save
      </Button>
      <Input id="email" placeholder="[email protected]" />
    </Card>
  );
}

Admin Dashboard Usage

import { Topbar, AdminSidebar, StatsCard, Table, Pagination } from "shubh-ui";
import { BarChart3, Users, TrendingUp } from "lucide-react";

export function AdminDashboard() {
  const [page, setPage] = useState(1);

  return (
    <div className="flex h-screen">
      <AdminSidebar
        collapsed={false}
        activeItem="dashboard"
        navigation={[
          { id: "dashboard", label: "Dashboard", icon: <Home /> },
          { id: "users", label: "Users", icon: <Users /> },
          { id: "reports", label: "Reports", icon: <BarChart3 /> },
        ]}
      />
      <div className="flex-1 flex flex-col">
        <Topbar
          title="Dashboard"
          notifications={3}
          userName="John Doe"
          onSearchChange={(q) => console.log("Search:", q)}
        />
        <main className="flex-1 overflow-auto p-6">
          <div className="grid grid-cols-1 md:grid-cols-3 gap-6">
            <StatsCard
              title="Total Users"
              value="2,543"
              trend="up"
              trendPercent={12}
              icon={<Users className="h-6 w-6" />}
            />
            <StatsCard
              title="Revenue"
              value="$45,230"
              trend="up"
              trendPercent={8}
              icon={<TrendingUp className="h-6 w-6" />}
            />
          </div>
          <Table columns={columns} data={tableData} />
          <Pagination total={100} page={page} onPageChange={setPage} />
        </main>
      </div>
    </div>
  );
}

Available Starter Exports

Core Components

  • Button
  • Input
  • Label
  • Card
  • Modal
  • Badge
  • Tabs
  • Select
  • Textarea

Extended Components

  • Accordion
  • Alert
  • Avatar
  • Breadcrumb
  • Calendar
  • Checkbox
  • Divider
  • Drawer
  • Dropdown
  • Progress
  • Radio
  • ServerDataTable
  • Skeleton
  • Spinner
  • Switch
  • Tag
  • Tooltip

Data & Display

  • Table
  • Pagination
  • Sidebar (layout)
  • Navbar (layout)

Admin Dashboard Components

  • Topbar — Header with menu toggle, search, notifications, and user profile
  • AdminSidebar — Collapsible sidebar navigation with icons and nested items
  • StatsCard — KPI card with title, value, trend, and icon support
  • Form Components — Input, Select, Textarea, Checkbox, Radio, Switch for admin forms
  • DataTable — Sortable table with pagination and row actions
  • Pagination — Page navigation with configurable steps

Utilities & Hooks

  • cn() — Tailwind class merger (clsx + tailwind-merge)
  • useToggle() — Boolean state toggle
  • useDebounce() — Debounce values
  • useClickOutside() — Detect clicks outside element

Token-Based Theming

This library uses semantic design tokens via CSS custom properties and Tailwind color aliases.

  • Light theme: :root / [data-theme="light"]
  • Navy dark theme: [data-theme="navy"] or .dark

Runtime switch example:

document.documentElement.setAttribute("data-theme", "light");
document.documentElement.setAttribute("data-theme", "navy");
document.documentElement.classList.toggle("dark", true);

Scripts

npm run dev           # tsup watch build
npm run build         # library build (esm + cjs + d.ts)
npm run lint          # lint
npm run dev:showcase  # Next.js showcase page
npm run build:showcase

Build Output

tsup compiles from src/index.ts and generates:

  • ESM
  • CommonJS
  • Type definitions
  • Sourcemaps