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

@ship-it-ui/ui

v0.0.3

Published

React component library for the Ship-It design system. Tailwind v4 + Radix UI primitives, themed via @ship-it-ui/tokens.

Downloads

212

Readme

@ship-it-ui/ui

The React component library for the Ship-It design system.

How this fits in

Part of the Ship-It Design System. See the architecture overview for how @ship-it-ui/tokens, @ship-it-ui/icons, @ship-it-ui/ui, and @ship-it-ui/shipit compose.

Architecture

src/
├── components/          Atomic components (Button, Input, Avatar, Dialog, …)
│   └── Button/
│       ├── Button.tsx           Component + cva variant definitions
│       ├── Button.stories.tsx   Storybook stories (also serve as autodocs)
│       ├── Button.test.tsx      Vitest + Testing Library + vitest-axe
│       └── index.ts             Re-exports the component + types
├── patterns/            Composites of components (Tabs, Combobox, DataTable, …)
├── hooks/               useEscape, useOutsideClick, useTheme, useDisclosure,
│                          useControllableState, useKeyboardList
├── utils/
│   └── cn.ts            clsx + tailwind-merge
├── styles/
│   ├── globals.css      Tailwind v4 entrypoint + token CSS-var bridge
│   └── animations.css   Keyframes (spin, pulse, indeterminate, dialogIn, …)
├── test/
│   └── setup.ts         Vitest global setup (jsdom polyfills + vitest-axe)
└── index.ts             Public API barrel — only re-exports

Component anatomy

Every component follows the same shape — open Button/ to see the canonical example:

| File | What it contains | | --------------- | ------------------------------------------------------------- | | Component.tsx | The implementation. Variants via cva. Tokens via Tailwind. | | *.stories.tsx | One story per variant + a "Sizes" / "States" composite story. | | *.test.tsx | Render, interaction, and axe a11y tests. | | index.ts | Re-exports the component and any related types. |

Adding a new component

See docs/adding-a-component.md for the step-by-step guide. In short:

  1. Copy src/components/Button/ and rename to your component.
  2. Replace the implementation, story, and tests.
  3. Add a re-export line to src/index.ts.
  4. pnpm --filter @ship-it-ui/ui test — make sure tests pass and axe is clean.
  5. Run Storybook (pnpm dev) and visually verify.
  6. pnpm changeset — describe the new component as a minor bump.

Conventions

  • Always consume semantic tokens, never primitive ones. bg-accent, not bg-indigo-600.
  • Forward refs. Every component uses forwardRef so consumers can attach refs and Radix integrations can wire focus management.
  • asChild polymorphism. Use @radix-ui/react-slot for components that should be able to render as a different element (e.g., a Link).
  • A11y is non-negotiable. Tests assert axe violations === 0. Use @testing-library/user-event (not fireEvent) so interactions match real user input.
  • Styling: Tailwind classes consuming token CSS variables. Keep all variant logic inside cva — no inline conditional classNames in JSX.