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

@crystal-ui/react

v0.1.0-alpha.1

Published

React components for the Crystal design system, built on React Aria.

Readme

Crystal React

React components for the Crystal design system. The package name is @crystal-ui/react.

Crystal React implements Crystal for React. It takes every token, material and motion recipe from @crystal-ui/core and defines none of its own. The requirements it is held to are in libraries/CONTRACT.md in the design system repository.

Status

Version 0.1.0-alpha.1, published to npm under the alpha tag and licensed under MIT (see LICENSE):

npm install @crystal-ui/react@alpha @crystal-ui/core

It is an alpha, published as it stands. Its API can change between alphas without notice, and it depends on @crystal-ui/core 2.4.0. Any breaking change in Crystal 2.x, in this library or in the core it follows, will be fixed in Crystal 3.0 rather than in a 2.x release.

It needs a bundler (Vite, webpack, Next.js, esbuild). Plain Node ESM cannot import it yet, because it imports Crystal's JSON without an import attribute (R-30 in docs/open-issues.md).

282 of the 284 components in Crystal's catalogue are implemented. The other two, terminal and border-beam, are recorded as not applicable, with the reasons in the catalogue. Per-component status is in the generated component-manifest.json, and the design system records it in libraries/status/web.json.

The documentation website, slice Q of the plan, is not built yet. Storybook is the review surface until it is.

The plan is docs/implementation-plan.md. Open issues are in docs/open-issues.md.

Using it

Import Crystal's stylesheets once, before this library's, and wrap the application or any subtree in CrystalProvider.

import '@crystal-ui/core/theme';
import '@crystal-ui/core/css';
import '@crystal-ui/react/styles.css';
import { CrystalProvider, Button } from '@crystal-ui/react';

<CrystalProvider palette="prism" mode="light">
  <Button variant="primary">Save</Button>
</CrystalProvider>

The provider scopes the theme to its own element, so a dark region inside a light page needs no second root. useCrystalTheme throws outside a provider.

Crystal paints every <button> by element, so the core stylesheets are required. Without them a button renders with the browser's default appearance.

Three entry points: @crystal-ui/react (every component), @crystal-ui/react/blocks (the blocks, which products are expected to fork) and @crystal-ui/react/editor (RichTextEditor, Crystal's rich text surface with TipTap bound to it). The editor's TipTap packages are optional peer dependencies, installed only if you import it; the engine-agnostic RichTextSurface and the format vocabulary stay in the main entry. See docs/proposals/2026-10-02-media-text-and-recipe-parity.md.

How it consumes Crystal

@crystal-ui/core is a dependency, installed from npm at ^2.4.0.

Design values enter the library in one place. scripts/build-tokens.mjs reads Crystal's generated export and writes src/styles/_tokens.scss and src/theme/tokens.generated.ts. Both files are gitignored. pnpm lint:tokens fails on a hard-coded colour or length anywhere else in the source.

Decisions

React Aria Components. Radix ships no date picker, calendar, combobox, table, tree, colour picker, number field, tag group or drag and drop, and the contract says to wrap a maintained primitive instead of building one. React Aria also exposes state as data-* attributes, which lets the styling be plain SCSS.

SCSS. Runtime theming uses custom properties and compile-time values are SCSS variables, so the library needs no style runtime.

Motion. The engines, springs, recipes and state derivation come from @crystal-ui/core. This library implements the React lifecycle around them: refs, effects and cleanup.

Scripts

| Script | What it does | | --- | --- | | pnpm tokens | Regenerates the token files from Crystal. | | pnpm build | Builds the package, the type declarations and the component manifest. | | pnpm typecheck | Runs TypeScript in strict mode. | | pnpm test | Runs the unit tests with Vitest. | | pnpm test:jest | Runs the Jest compatibility suite. | | pnpm lint:tokens | Fails on a hard-coded design value. | | pnpm storybook | Starts Storybook on port 6006. | | pnpm verify | Runs the token lint, the type check, the story checks, both test suites and the build. | | pnpm verify:targets | Measures target sizes in a browser. | | pnpm verify:behaviour | Checks keyboard and motion behaviour in a browser. | | pnpm verify:theme | Checks the theme as rendered. | | pnpm verify:materials | Compares the rendered materials with Crystal's. | | pnpm verify:appearance | Checks rendered states that a DOM without layout cannot see. |