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

@josui/react

v0.4.0

Published

React component library for the Josui design system.

Readme

@josui/react

React component library for the Josui design system.

Installation

pnpm add @josui/react

Setup

1. Import Tailwind styles

/* app.css or globals.css */
@import '@josui/tailwind';

2. Configure Tailwind source scanning

Add the @source directive to your CSS to ensure Tailwind scans the component library for class names:

/* app.css or globals.css */
@import '@josui/tailwind';
@source '../node_modules/@josui/react/dist';

This tells Tailwind v4 to include the component library's dist folder when scanning for utility classes. Without this, component styles may be purged from your production build.

Architecture

Tailwind CSS Styling

Components use Tailwind CSS classes with the cn() utility from @josui/core-web for class merging. All components support the className prop for customization:

<Button className="my-custom-class" variant="primary">
  Click me
</Button>

Accessibility

Components follow WAI-ARIA patterns with proper roles, labels, and keyboard navigation.

Customizing Styles

Override with className

All components accept a className prop that merges with default styles:

<Button className="rounded-full" variant="primary">
  Rounded Button
</Button>

Tailwind Configuration

Extend your Tailwind config to customize the design tokens:

// tailwind.config.js
export default {
  theme: {
    extend: {
      colors: {
        primary: {
          500: '#your-color',
          600: '#your-hover-color',
        },
      },
    },
  },
};

Components

  • Button — Primary actions with variants, sizes, loading state
  • Card — Container with header, content, footer sections
  • Input — Form input field
  • Badge — Status indicators and labels
  • Typography — Text styling component
  • Avatar — User profile images
  • Spinner — Loading indicator
  • Alert — Notification messages
  • CustomCursor — GSAP-powered custom cursor (auto-hidden on touch)
  • CellGrid — Interactive canvas background with cell highlighting
  • ThemeToggle — Dark/light/system theme toggle button

Hooks

  • useIsTouchDevice — Detect touch-capable devices
  • useInteractiveState — Subscribe to cursor over interactive element state
  • useScrollDirection — Track scroll direction (up/down)
  • useTheme — Manage theme state (light/dark/system) with optional keyboard shortcut
  • useKeyboardShortcut — Add keyboard shortcuts with auto-cleanup

AI-Assisted Development

This package includes a skill for AI coding assistants. Copy it to your project:

cp -r node_modules/@josui/react/skills/use-react-components .claude/skills/

The skill helps AI assistants correctly use components with proper props and patterns.

See Storybook for interactive examples and full API documentation.