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

@ds-mo/tokens

v2.5.0

Published

TokoMo design tokens — colors, dimensions, typography, and effects as CSS custom properties, JSON, and TypeScript constants

Readme

@ds-mo/tokens

Design tokens as CSS custom properties, JSON, and TypeScript constants — the token foundation for the CompoMo design system.

Part of the design system trilogy: TokoMo (@ds-mo/tokens) → IcoMo (@ds-mo/icons) → CompoMo (@ds-mo/ui)

Figma-first: tokens are exported from Figma variables and built into CSS via generator scripts. Drop in new JSON, run the build, everything updates.

npm version

Install

npm install @ds-mo/tokens
# or
pnpm add @ds-mo/tokens

# Local development (no npm publish needed):
pnpm add file:../path/to/tokomo

Usage

CSS

/* All tokens at once */
@import '@ds-mo/tokens';

/* Or selectively */
@import '@ds-mo/tokens/colors';
@import '@ds-mo/tokens/dimensions';
@import '@ds-mo/tokens/typography';
@import '@ds-mo/tokens/effects';

/* Optional: base styles (font loading, reduced-motion, focus rings) */
@import '@ds-mo/tokens/globals';

/* Optional: CSS reset */
@import '@ds-mo/tokens/reset';

JS / TypeScript (via bundler)

import '@ds-mo/tokens';
import '@ds-mo/tokens/globals';

// Type-safe token name constants
import { colorBackgroundPrimary, dimensionSpace200 } from '@ds-mo/tokens/ts';
// value is just the CSS variable name string: '--color-background-primary'
element.style.setProperty(colorBackgroundPrimary, 'red');

JSON (for tooling, plugins, etc.)

import tokens from '@ds-mo/tokens/json';
import colors from '@ds-mo/tokens/json/colors';

Theming

Light/dark theme is controlled via a data-theme attribute on <html>:

document.documentElement.setAttribute('data-theme', 'dark');
document.documentElement.setAttribute('data-theme', 'light');

Light is the default. No JS required — pure CSS variable overrides.

Token categories

| File | Prefix | Contains | |---|---|---| | colors.css | --color-* | Semantic colors (light + dark), reference palette, data viz | | dimensions.css | --dimension-* | Space, radius, size, stroke-width — all calc() from --dimension-base | | typography.css | --typography-* | Weight, font-size, line-height, letter-spacing + .text-* classes | | effects.css | --effect-* | Blur, animation timing, easing, elevation shadows |

Scaling

All dimension tokens are calc() from --dimension-base: 8px. Override it to scale everything:

:root {
  --dimension-base: 10px; /* scales all spacing, radius, size, stroke-width */
}

Or override a single category:

:root {
  --dimension-space-base: 10px;
  --dimension-radius-base: 6px;
}

Elevation

Each level gives you three tokens to handle overflow: hidden clipping:

/* Simple case — no overflow clipping */
.card { box-shadow: var(--effect-elevation-elevated-sm); }

/* With overflow: hidden — split shadow and highlight */
.card {
  overflow: hidden;
  box-shadow: var(--effect-shadow-elevated-sm);   /* outset on root */
  position: relative;
}
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--effect-highlight-elevated-sm); /* inset on overlay */
  pointer-events: none;
}

Available: elevated-none, elevated-sm, elevated-md, elevated-floating, depressed-sm, depressed-md, elevated-panel-top/right/bottom/left

Updating from Figma

  1. Export updated variable JSON from Figma
  2. Drop into src/json/{colors,dimensions,typography,effects}/
  3. Run the build:
node scripts/build.mjs

Dev

node scripts/build.mjs          # full build
node scripts/build.mjs --watch  # watch mode

License

MIT