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

@patterninc/pattern-ui

v0.0.0-main.202610170939.22a60c8bf2de

Published

Readme

Pattern UI

Pattern UI (@patterninc/pattern-ui) is the Pattern component library: React 19 components, semantic color tokens, and icons built with Tailwind CSS v4. It is the UI foundation for Pattern EXP apps (Pi, Oly, Toggle, and apps moving off @patterninc/react-ui).

Source lives in lib/pattern-ui. Component docs and interaction tests run in Storybook.

Install

The package is public on npm as @patterninc/pattern-ui.

In this monorepo, keep the workspace protocol so apps always use the local package:

"@patterninc/pattern-ui": "workspace:*"

In any other repository, depend on the latest dist-tag. CI publishes a prerelease on every merge to main that touches lib/pattern-ui (0.0.0-main.<YYYYMMDDHHMM>.<sha>) and moves latest. Git stays at 0.0.1. We're not doing semver, so there's no API backwards-compatibility promises between versions.

Use "latest" specifically. * and ^0.0.0 skip prereleases, so they will not pick up new publishes.

pnpm add @patterninc/pattern-ui@latest
"@patterninc/pattern-ui": "latest"

Use

Import styles once, as early as the app entry allows:

import '@patterninc/pattern-ui/styles.css'

Each component is its own export. There is no barrel index.

import { Button } from '@patterninc/pattern-ui/button'
import CheckIcon from '@patterninc/pattern-ui/icons/CheckIcon'
import { ListItem } from '@patterninc/pattern-ui/list-item'

The import path is the kebab-case key in package.json "exports". Stories under src/components/<Name>/ show props and variants.

Most interactive components accept asChild, which merges their props onto a single child (Link, a, and so on) instead of wrapping it.

Dark mode follows a dark class on document.documentElement. Animated theme changes use startThemeTransition from @patterninc/pattern-ui/theme-transition.

Color tokens

Use semantic tokens from src/pattern-themed-tailwind.css. They adapt to light and dark mode. The theme resets Tailwind's default palette, so stock utilities such as bg-blue-500 are not available.

| Role | Examples | | ---------- | --------------------------------------------------------------- | | Text | text-text-strong, text-text-sub, text-text-disabled | | Background | bg-primary-base, bg-base-weak, bg-depth-black-4 | | Border | border-border-sub | | Status | text-positive-base, text-negative-base, text-caution-base |

Interactive variants use -base (default), -light (hover), -dark (active), and -lighter (disabled). Comment every arbitrary value (w-[103px]). Do not hardcode hex, rgb, or oklch in class names.

Browser artifacts

A single HTML file can render Pattern UI with no install and no build. Use that when an artifact or doc needs the real components and styles. The steps are in examples/README.md. examples/static-artifact.html is the artifact page. examples/playground-artifact.html is that page with an editor. Claude artifacts need play-cdn-claude.js instead of play-cdn.js; see Claude artifacts.

Develop

Run commands from the monorepo root.

| Command | What it does | | ----------------------------------------------- | ------------------------------------------ | | pnpm --filter pattern-ui storybook | Storybook on port 7007 | | pnpm exec vp run @patterninc/pattern-ui#build | Cached library build (vp pack → dist/) | | pnpm --filter pattern-ui watch | Rebuild on change | | pnpm --filter pattern-ui check | Lint, format, and type-check | | pnpm --filter pattern-ui check:fix | Same, with autofix | | pnpm --filter pattern-ui test | Unit tests and Storybook play tests | | pnpm --filter pattern-ui test:unit | *.test.ts only (Node) | | pnpm --filter pattern-ui test:storybook | Play-function tests (Chromium) | | pnpm --filter pattern-ui chromatic | Visual regression against Storybook |

On a fresh clone, install the test browser once before test or test:storybook:

pnpm --filter pattern-ui exec playwright install chromium

Chromatic uses a shared snapshot quota. Run it once per pull request, right before review, and paste the link into the PR template.

Contribute

Component, export, Storybook, and token rules for this package are in AGENTS.md. Story shape is defined in docs/pattern-ui-storybook-standards.md.

When adding a public component, export it inline with export function, add a matching "exports" entry in package.json, and add stories next to the component.