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

@o3osatoshi/ui

v0.0.6

Published

@o3osatoshi/ui

Downloads

124

Readme

@o3osatoshi/ui

Reusable React UI components built on Tailwind CSS v4 and Radix UI. Each component exposes consistent data-slot attributes so you can reliably target and override styles from your app.

Install

  • Peer requirements: react, react-dom (18 or newer recommended)
  • Recommended: Tailwind CSS v4 + Vite
  • Install: pnpm add @o3osatoshi/ui

Import the global stylesheet once in your app (e.g., App/Layout entry):

import '@o3osatoshi/ui/globals.css'

The stylesheet defines tokens via Tailwind v4’s @theme inline (e.g., --background, --foreground). You can override these CSS custom properties to theme the library.

Usage

  • Preferred: import from the package entry
    • import { Button, Input } from '@o3osatoshi/ui'
  • Subpath imports (TypeScript sources) are available for workspace/Storybook
    • import { Button } from '@o3osatoshi/ui/components/button'
    • import { cn } from '@o3osatoshi/ui/lib/utils'

Using the top‑level entry is recommended for stability and tree‑shaking.

Components

  • Buttons: Button (variant, size, asChild)
  • Forms: Input, Label
  • Feedback: Alert, Message
  • Overlays: Dialog suite, Sheet suite
  • Navigation: Sidebar suite
  • Others: Avatar, Breadcrumb, DropdownMenu, Separator, Skeleton, Tooltip, etc.

All components expose data-slot attributes to make styling overrides predictable.

Examples

Buttons:

import { Button } from '@o3osatoshi/ui'

export default function Page() {
  return (
    <div className="p-4">
      <Button variant="default">Save</Button>
      <Button variant="destructive" className="ml-2">Delete</Button>
    </div>
  )
}

Dialog (Radix‑based):

import { Button, Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle } from '@o3osatoshi/ui'

export function ExampleDialog() {
  return (
    <Dialog>
      <DialogTrigger asChild>
        <Button>Open</Button>
      </DialogTrigger>
      <DialogContent>
        <DialogHeader>
          <DialogTitle>Title</DialogTitle>
        </DialogHeader>
        Body text
      </DialogContent>
    </Dialog>
  )
}

Input + Message:

import { Input } from '@o3osatoshi/ui'
import { Message } from '@o3osatoshi/ui/components/base/message'

export function ExampleForm() {
  return (
    <div className="space-y-2">
      <Input placeholder="Email" aria-invalid />
      <Message variant="destructive">Invalid email format</Message>
    </div>
  )
}

Styling

  • Tailwind v4 tokens
    • globals.css defines CSS variables such as --background, --primary, etc.
    • Use data-slot selectors (e.g., [data-slot="dialog-content"]) to safely target internals.
  • Utility
    • cn(...classes) is a light wrapper around clsx + tailwind-merge.

Notes (current implementation)

  • Client‑only components
    • Files like Dialog, Sheet, Sidebar, Avatar include "use client". In Next.js, use them from client components.
  • Sidebar state
    • Open/close state is persisted via cookie. Initialize/read as needed in your app.
  • Subpaths
    • Subpath imports expose TypeScript sources for workspace DX. Prefer the top‑level entry for application code.

Exports

  • Package entry (recommended): @o3osatoshi/ui
    • ESM: ./dist/entry.js
    • Types: ./dist/entry.d.ts
  • Subpaths (TS sources):
    • @o3osatoshi/ui/components/*
    • @o3osatoshi/ui/hooks/*
    • @o3osatoshi/ui/lib/*
    • @o3osatoshi/ui/globals.css

Prefer the compiled entry; use subpaths mainly for local Storybook/workspace flows.

Development

  • Typecheck: pnpm -C packages/ui typecheck
  • Build: pnpm -C packages/ui build
  • Storybook (workspace): pnpm -C apps/storybook dev

License

  • MIT

Quality

  • Tests: pnpm -C packages/ui test / pnpm -C packages/ui test:cvrg
  • Coverage: Coverage: @o3osatoshi/ui