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

native-dark

v0.2.0

Published

CSS-only UI library — dark-first design tokens and BEM primitives ported from the Emmerse dashboard.

Readme

Native Dark CSS

A CSS-only UI primitives library with first-class light and dark themes. Hand-written, framework-agnostic.

Install

pnpm add native-dark

Or drop the bundled file in directly:

<link rel="stylesheet" href="node_modules/native-dark/dist/native-dark.css" />

Fonts

Fonts are consumer-controlled: the library exposes two tokens, --nd-font-sans and --nd-font-mono, and never fetches a web font itself. Defaults are Geist / Geist Mono with strong system fallbacks (ui-sans-serif, system-ui, …).

To use Geist, load it however you normally load web fonts:

<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap" />

To use anything else, override the tokens:

:root {
  --nd-font-sans: 'Inter', system-ui, sans-serif;
  --nd-font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

Dark / Light Theme

Theme is controlled by the data-theme attribute on any ancestor (typically <html>):

<html data-theme="dark">
  …
</html>

Omit the attribute (or set anything other than "dark") for light. Switching at runtime is a single attribute write; nothing in the library reads the OS preference, so you decide the policy.

Class API

All classes use BEM. State is conveyed by:

  • standard pseudo-classes (:disabled, :checked, :focus-visible)
  • ARIA attributes ([aria-selected="true"])
  • explicit state classes (.is-open, .is-loading)

See demo for more.

Tokens

Primary color

The brand color is exposed as a single token, --nd-primary. Override the variable to set custom theme color:

:root {
  --nd-primary: #ff5b8a;
}

See demo for more.

Utilities (optional)

An atomic utility layer ships separately and is not part of the main bundle — import it only if you want it:

@import 'native-dark/utilities';        /* or 'native-dark/utilities/min' */
<link rel="stylesheet" href="node_modules/native-dark/dist/native-dark-utilities.css" />

All classes are namespaced with nd- so they never collide with the BEM component classes:

<div class="nd-flex nd-items-center nd-justify-between nd-gap-3 nd-p-4">…</div>
<ul class="nd-space-y-2">…</ul>
<div class="nd-grid nd-grid-cols-1 nd-md:grid-cols-3 nd-gap-4">…</div>

What's included: padding / margin (nd-p-*, nd-px-*, nd-mt-*, negative nd--mt-*, nd-mx-auto), flexbox (nd-flex, nd-items-*, nd-justify-*, nd-flex-1, nd-grow…), grid (nd-grid, nd-grid-cols-1..12, nd-col-span-*…), gap & space-between (nd-gap-*, nd-space-x-*, nd-space-y-*), and a few display helpers (nd-block, nd-hidden…).

Spacing scale

Spacing uses integer steps tokenised as --nd-space-* (rem-based, 1 = 0.25rem). Retheme spacing globally by overriding a token:

:root {
  --nd-space-4: 12px; /* every nd-p-4, nd-gap-4, nd-mt-4, … follows */
}

Responsive

Mobile-first min-width variants are prefixed sm: / md: / lg: (480px / 721px / 1024px):

<div class="nd-hidden nd-md:block">visible from 721px up</div>

The utility layer is generated by scripts/generate-utilities.mjs (pnpm gen:utilities) — edit that config, not src/utilities.css.

Build

pnpm install
pnpm build

Demo

pnpm demo

Then open http://localhost:4321/demo/.

Browser support

Evergreen browsers only. Uses color-mix(), oklch(), oklch(from ...) relative color syntax, light-dark(), @property, backdrop-filter, dvh, text-wrap: balance.

Note No IE / legacy fallbacks.

Viewport support

Mobile-first. Minimum supported viewport: 375 × 667 (iPhone SE class).