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

@cumulus-ui/design-tokens

v0.4.4

Published

CSS custom properties for Cumulus UI — light and dark mode tokens generated from Cloudscape Design System

Readme

@cumulus-ui/design-tokens

CSS custom properties for Cumulus UI — light and dark mode tokens generated from Cloudscape Design System.

Install

npm install @cumulus-ui/design-tokens

Usage

CSS

Load the token stylesheet once in your application entry point:

import '@cumulus-ui/design-tokens/tokens.css';

Then use tokens as CSS custom properties anywhere:

.my-component {
  color: var(--color-text-body-default);
  background: var(--color-background-layout-main);
  border-radius: var(--border-radius-container);
}

JavaScript / TypeScript

For inline styles or JS-driven styling, import named token constants:

import { colorTextBodyDefault, colorBackgroundLayoutMain } from '@cumulus-ui/design-tokens';

element.style.color = colorTextBodyDefault; // → "var(--color-text-body-default)"

Dark mode

Tokens respond to the .awsui-dark-mode class on <html>:

// Enable dark mode
document.documentElement.classList.add('awsui-dark-mode');

// Disable dark mode
document.documentElement.classList.remove('awsui-dark-mode');

All token values update automatically — no additional imports or class changes needed.

Token naming

Tokens follow the Cloudscape CTI naming convention (Category → Type → Item → State):

--color-background-button-primary-default
  │       │         │       │       └─ state
  │       │         │       └───────── sub-item
  │       │         └───────────────── item
  │       └─────────────────────────── type
  └─────────────────────────────────── category

Design decisions

No hashed variable names

Cloudscape uses content-hashed suffixes on CSS custom property names (e.g. --color-text-body-default-vvtq8u). The hash is an MD5 digest of the token's value set, designed to signal version changes and discourage direct CSS usage in their React ecosystem.

Cumulus strips these hashes. Our CSS properties use canonical token names directly:

/* Cloudscape */
var(--color-text-body-default-vvtq8u, #0f141a)

/* Cumulus */
var(--color-text-body-default, #0f141a)

Why: Hashed names provide collision avoidance and version signaling, but at the cost of developer experience. Every other web component design system (Shoelace, Spectrum, Carbon, Vaadin) uses clean, human-readable names. Since Cumulus owns both the token definitions and the component CSS, we can guarantee name-value consistency through our generation pipeline rather than encoding it in variable names. See the full rationale below.

What Cloudscape's hashes solve and how we address each:

| Cloudscape concern | Hash solution | Cumulus alternative | |---|---|---| | Value changes break silently | Hash changes → loud CSS failure | We regenerate tokens + components in the same release | | Direct CSS usage discouraged | Names are unmemorable | Direct CSS usage is encouraged — clean names are the API | | Multi-theme collision | Different hashes per theme | Not applicable; single-theme with light/dark mode |

No namespace prefix

Unlike other design systems (--sl-, --cds-, --spectrum-), Cumulus tokens have no prefix. The CTI naming convention produces specific enough names (--color-background-button-primary-default) that collisions are impractical. If a prefix becomes necessary (e.g. for multi-system pages), it can be added to the generator with a one-line change.

No fallbacks in JS exports

The JavaScript token exports contain var() references without fallback values:

export const colorTextBodyDefault = "var(--color-text-body-default)";
// NOT: "var(--color-text-body-default, #0f141a)"

This is intentional. If tokens.css is not loaded, things should break visibly rather than silently rendering light-mode-only values. Component CSS retains inline fallbacks as a safety net for Shadow DOM isolation.

Regenerating

Tokens are auto-generated from @cloudscape-design/design-tokens:

npm run generate

This reads the upstream JSON (token names + light/dark values) and JS (to discover the token set), then outputs tokens.css, index.js, and index.d.ts with clean names.