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

@kongmy-dev/sapphire-ui

v4.1.0

Published

Navy and gold, product and editorial typography, one CSS contract. Use Sapphire as plain HTML classes, Tailwind tokens, typed React components, or vendored registry source. Fonts ship with the package. CSS and native elements need no React dependency.

Downloads

621

Readme

Sapphire UI

Navy and gold, product and editorial typography, one CSS contract. Use Sapphire as plain HTML classes, Tailwind tokens, typed React components, or vendored registry source. Fonts ship with the package. CSS and native elements need no React dependency.

Catalogue · Design · Package contract · Registry · Migration · Changelog

Version 4.1 includes API and theme changes from 4.0. Follow the migration guide before updating an existing application.

bun add @kongmy-dev/sapphire-ui

HTML classes

Import the full stylesheet through your bundler:

@import '@kongmy-dev/sapphire-ui/sapphire.css';
<button class="sp-button" data-variant="brand">Save</button>
<article class="sp-card"><h2>Account</h2><p>Shared styles, native markup.</p></article>

Use the catalogue's HTML snippets for static markup. A snippet of a React portal cannot implement its overlay interaction; use its React component or your own behaviour.

Tailwind tokens

Compile your utilities against Sapphire's token mapping:

@import 'tailwindcss';
@import '@kongmy-dev/sapphire-ui/tailwind.css';
@import '@kongmy-dev/sapphire-ui/sapphire.css';
<p class="text-muted-foreground">Quiet copy</p>

Utilities override component-layer styles. --brand is decorative gold; --brand-text is the token for readable gold text.

React

Install react and react-dom. Interactive primitives also use the optional radix-ui peer; SplitLayout uses optional react-resizable-panels.

import { Button } from '@kongmy-dev/sapphire-ui/button';
import { Card } from '@kongmy-dev/sapphire-ui/card';
import '@kongmy-dev/sapphire-ui/sapphire.css';

export function Account() {
  return <Card><Button variant="brand">Save</Button></Card>;
}

Use public subpaths; there is no JavaScript root barrel or CommonJS build. Icons accept React SVG elements. Basic components do not load Radix.

Registry

Initialize an existing Vite/Tailwind app with the base and map @sapphire to https://design.kongmy.dev/r/v4/{name}.json in components.json:

bunx --bun [email protected] init https://design.kongmy.dev/r/v4/base.json --yes
bunx --bun [email protected] add @sapphire/button @sapphire/dialog @sapphire/sidebar

The base imports foundations and bundled fonts. Each vendored component owns its local CSS. In a mixed app, import foundations.css plus only the package component CSS still in use. Give each component one JavaScript and CSS owner. The existing /r/ registry remains frozen; moving to /r/v4/ is explicit.

Customization

Use props and data attributes first, then utilities or consumer classes, then component --sp-* variables, then shared token overrides. Vendor a component when the app needs to own its implementation. Do not load its package CSS alongside the vendored CSS or combine the full stylesheet with mixed ownership.

Override colours on every theme scope so nested light/dark sections keep working:

:root, [data-theme="light"], [data-theme="dark"], .dark {
  --brand-text: light-dark(var(--primary), var(--on-dark));
}

Set data-theme="light" or data-theme="dark" on a scope. The theme helper exports initTheme, setTheme and subscriptions; the React theme-provider entry supplies reactive theme preferences. Call initialization in a browser; importing a module on the server does not initialize a document.

Native elements

import '@kongmy-dev/sapphire-ui/elements/toast';
import '@kongmy-dev/sapphire-ui/sapphire.css';

Native tags include sapphire-toast, cookie-banner, sapphire-analytics, sapphire-banner, sapphire-site-header and sapphire-site-footer. Import each entry to register its tag in a browser. Constructors are undefined during SSR. See the package guide for lifecycle and import contracts.

BSD 3-Clause License