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

@geenius/tokens

v0.4.0

Published

Geenius design tokens — single source of truth for colors, spacing, radii, shadows, and motion across the @geenius ecosystem

Readme

@geenius/tokens

Single source of truth for Geenius design tokens: OKLCH semantic colors, spacing, radii, shadows, durations, easing, fonts, layout measurements, density overrides, accent presets, generated CSS, DTCG JSON, and typed TypeScript data.

Tokens are authored in src/. scripts/generate.ts emits the published dist/css/*, dist/json/*, and dist/ts/* assets.

Installation

pnpm add @geenius/tokens

Usage

CSS Composition

Import the base token contract first, then one palette theme:

@import "@geenius/tokens/css/base.css";
@import "@geenius/tokens/css/themes/blue.css";

Tailwind 4 consumers import the bridge after the selected theme:

@import "tailwindcss";
@import "@geenius/tokens/css/base.css";
@import "@geenius/tokens/css/themes/blue.css";
@import "@geenius/tokens/css/tailwind-bridge.css";

Vanilla CSS / BEM consumers use only the base and theme files. The Tailwind bridge is not needed in CSS-only pipelines.

Namespace Rule

Tokens use a single global --gn-* namespace. Artifacts (packages, boilerplates, apps) may ship a tokens.local.css file for per-artifact overrides, but every declaration inside it must use the canonical global --gn-* namespace. Artifact- scoped names like --gn-<artifact>-* or --gn-local-* are not allowed — tokens are always named globally so they remain reusable across the ecosystem. BEM class names (.gn-<artifact>-*) are unrelated to this rule and continue to use per-artifact prefixes for selector collision avoidance.

Dark Mode

The v2 package does not publish an @geenius/tokens/dark subpath. Dark values ship inside base.css and every theme stylesheet.

Force dark mode with a root attribute:

<html data-theme="dark">
  <body>...</body>
</html>

Force light mode with data-theme="light". When no forcing attribute is set, the generated CSS includes an OS fallback:

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    /* dark --gn-* values */
  }
}

Accent Presets

Presets are additive. They add --gn-preset-<name>-accent, --gn-preset-<name>-glow, and --gn-preset-<name>-gradient without changing the active palette.

@import "@geenius/tokens/css/base.css";
@import "@geenius/tokens/css/themes/blue.css";
@import "@geenius/tokens/css/presets/sunset.css";

.cta {
  --gn-accent: var(--gn-preset-sunset-accent);
  background: var(--gn-preset-sunset-gradient);
}

TypeScript / React Native

Non-CSS consumers can read the same token values from the root export:

import {
  COLOR_ROLES,
  blue,
  invariants,
  lagoon,
  palettes,
  presets,
  type ColorRole,
} from "@geenius/tokens";

const accent = blue.light.accent;
const cardPadding = invariants.spacing["4"];
const presetAccent = lagoon.accent;
const roles: ColorRole[] = [...COLOR_ROLES];
const themeNames = Object.keys(palettes);
const presetNames = Object.keys(presets);

Design Tools

DTCG JSON assets are published for Style Dictionary, Tokens Studio for Figma, and similar tools:

@geenius/tokens/json/invariants.json
@geenius/tokens/json/themes/<palette>.<light|dark>.json
@geenius/tokens/json/presets/<name>.json

API Reference

TypeScript Exports

| Export | Kind | Purpose | | --- | --- | --- | | COLOR_ROLES | value | Canonical semantic color-role tuple | | invariants | value | Spacing, radius, shadow, duration, easing, font, and layout tokens | | densities | value | Compact and spacious spacing overrides | | golden, blue, teal | values | Light/dark palette objects | | lagoon, ocean, sunset, berry, forest, slate | values | Additive accent preset objects | | palettes | value | Palette registry keyed by name | | presets | value | Accent preset registry keyed by name | | ColorRole, ColorMap, Palette, Invariants | types | Palette and color-role contracts | | DensityName, DensityOverride | types | Density-mode contracts | | Preset | type | Accent preset contract |

CSS Subpaths

  • @geenius/tokens/css/base.css
  • @geenius/tokens/css/tailwind-bridge.css
  • @geenius/tokens/css/themes/golden.css
  • @geenius/tokens/css/themes/blue.css
  • @geenius/tokens/css/themes/teal.css
  • @geenius/tokens/css/presets/all.css
  • @geenius/tokens/css/presets/lagoon.css
  • @geenius/tokens/css/presets/ocean.css
  • @geenius/tokens/css/presets/sunset.css
  • @geenius/tokens/css/presets/berry.css
  • @geenius/tokens/css/presets/forest.css
  • @geenius/tokens/css/presets/slate.css

JSON Subpaths

  • @geenius/tokens/json/invariants.json
  • @geenius/tokens/json/themes/golden.light.json
  • @geenius/tokens/json/themes/golden.dark.json
  • @geenius/tokens/json/themes/blue.light.json
  • @geenius/tokens/json/themes/blue.dark.json
  • @geenius/tokens/json/themes/teal.light.json
  • @geenius/tokens/json/themes/teal.dark.json
  • @geenius/tokens/json/presets/lagoon.json
  • @geenius/tokens/json/presets/ocean.json
  • @geenius/tokens/json/presets/sunset.json
  • @geenius/tokens/json/presets/berry.json
  • @geenius/tokens/json/presets/forest.json
  • @geenius/tokens/json/presets/slate.json

Variants

@geenius/tokens is a foundation package with axes: none.

| Surface | Status | | --- | --- | | React / SolidJS UI variants | Not applicable | | Vanilla CSS variants | Not applicable | | React Native variant | Not applicable; use the root TypeScript exports | | DB providers | Not applicable | | Storybook apps | Not applicable |

Repository Layout

src/
  types.ts
  invariants.ts
  palette/
  preset/
  index.ts
scripts/
  generate.ts
dist/
  css/
  json/
  ts/

The deeper package specification lives in the monorepo docs at ../../.docs/DOCS/PACKAGES/TOKENS.md.

Testing

From geenius-packages/geenius-tokens:

pnpm run type-check
pnpm run test:unit
pnpm run test:contracts
pnpm run test:gauntlet

test:unit covers palette parity, snapshot output, and deterministic generation. test:contracts covers exports, dist contracts, manifest contracts, and packed import behavior. Run test:gauntlet before release-level changes.

Visual Demo

pnpm run demo

The demo serves demo/index.html at http://localhost:4173/demo/ with theme, mode, density, and preset controls for manually inspecting the token contract.