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

@kernelui-lib/styles

v1.0.0

Published

Kernel design tokens: CSS custom properties, baseline reset, and an optional Tailwind v4 bridge.

Readme

@kernelui-lib/styles

The token layer underneath every Kernel component. No JavaScript, no build step, just CSS custom properties.

Usage

Plain CSS or CSS Modules, no Tailwind:

@import "@kernelui-lib/styles";

That's tokens.css (all the custom properties) plus reset.css (a deliberately small baseline). Import them separately if you want the tokens without the reset:

@import "@kernelui-lib/styles/tokens.css";

With Tailwind v4:

@import "tailwindcss";
@import "@kernelui-lib/styles/tokens.css";
@import "@kernelui-lib/styles/tailwind.css";

The Tailwind bridge maps every token into @theme inline, so bg-accent, text-muted, rounded-md and so on resolve to the same values the components use. There's one source of truth either way.

The colour scale

Every colour role (gray, accent, plus the status colours) follows Radix Colors' 12-step model: each step has exactly one job, so you never have to guess which shade of a colour to reach for.

| Step | Use case | | --- | --- | | 1–2 | Backgrounds (app background, subtle background) | | 3–5 | Component backgrounds (resting, hover, pressed/selected) | | 6–8 | Borders (non-interactive, interactive, hover) | | 9–10 | Solid backgrounds (normal, hover) | | 11–12 | Text (low-contrast, high-contrast) |

Component CSS never reaches for a raw step directly. It reads semantic aliases (--kernel-color-surface, --kernel-color-border-interactive, --kernel-color-text-muted, and so on) that point at a specific step, so the mapping stays legible and the underlying scale can be restyled without touching a single component.

Unlike Radix's hand-picked swatches, Kernel generates all 12 steps from one hue and one chroma value per role using OKLCH, which is what makes the whole ramp reshade from a single change. The trade-off: Radix calibrates each hue individually against APCA contrast targets, Kernel uses one shared lightness/chroma curve for every hue. It's close, not identical, across very different hues, and it's why --kernel-hue-accent should be treated as "pick any hue and it'll look reasonable", not "guaranteed as vivid as it could be at that hue". For that, use a named theme (below).

Named accent themes

Seven named accent presets ship in themes/: amber, blue, green, orange, red, teal, and violet. They are generated by scripts/generate-accent-themes.mjs. Unlike the live --kernel-hue-accent curve above, every one of their 12 steps is individually checked against the sRGB gamut for that exact hue and lightness, and set to the punchiest chroma that still fits, rather than one flat chroma value applied everywhere. Real Radix does this by hand, per swatch; this script does the equivalent check programmatically with culori, which is why it only exists for a fixed set of hues chosen ahead of time rather than for any hue you type in live.

The names are verified against OKLCH-converted reference swatches (see the script), not eyeballed, on the theory that a colour called "Violet" should render as violet.

@import "@kernelui-lib/styles/themes/blue.css";
<html data-kernel-accent="blue">

Or pull in every preset at once for a theme switcher (see the docs site's homepage for a live example):

@import "@kernelui-lib/styles/themes/index.css";

Regenerate after changing a hue or adding a theme:

bun run generate:themes

Changing the theme

Override any token on :root, after importing:

:root {
  --kernel-hue-accent: 150; /* whole accent ramp shifts to green */
  --kernel-radius-base: 0.25rem; /* every radius in the system sharpens up */
}

Scope a theme to part of a page by overriding tokens on a container instead of :root:

.marketing-section {
  --kernel-hue-accent: 25; /* red, not "340", see the note above about checking a hue before naming it */
}

Light and dark are handled by light-dark() and follow prefers-color-scheme automatically. Force one explicitly with data-theme="light" or data-theme="dark" on html or any container.