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

@btlb/tokens

v1.0.0

Published

W3C Design Tokens for BTLB design system

Downloads

8

Readme

@btlb/tokens

W3C Design Tokens (DTCG spec) for the BTLB design system.

Installation

npm install @btlb/tokens

Usage

Import All Tokens

@import '@btlb/tokens';

This imports both primitives and semantic tokens in the correct cascade layer order.

Import Separately

/* Primitives only */
@import '@btlb/tokens/primitives.css';

/* Semantic tokens only (requires primitives) */
@import '@btlb/tokens/semantic.css';

Token Structure

Primitives

Raw design values organized by category:

  • Colors: Gray, blue, green, red, amber scales (50-950)
  • Spacing: 0-64 scale in rem units
  • Typography: Font families, sizes, weights, line heights
  • Radii: Border radius values
  • Shadows: Box shadow tokens
  • Motion: Durations and easing curves

Example:

var(--color-blue-600)
var(--space-4)
var(--font-size-lg)
var(--radius-md)
var(--shadow-lg)
var(--motion-duration-base)

Semantics

Purpose-driven tokens that reference primitives:

  • Backgrounds: --color-bg-surface, --color-bg-interactive, etc.
  • Text: --color-text-primary, --color-text-secondary, etc.
  • Borders: --color-border-default, --color-border-focus, etc.
  • Status: Success, error, warning, info variants
  • Spacing: --spacing-card-padding, --spacing-button-padding-x, etc.
  • Typography: --typography-body-font-size, --typography-heading-font-weight, etc.

Example:

var(--color-bg-surface)
var(--color-text-primary)
var(--spacing-card-padding)
var(--typography-body-font-size)

Customizing Tokens

Option 1: Override in Your CSS

@import '@btlb/tokens';

/* Override semantic tokens for your theme */
@layer semantic {
  :root {
    --color-bg-interactive: var(--color-green-600);
    --color-text-primary: var(--color-gray-950);
  }
}

Option 2: Import Your Own W3C Tokens

Export design tokens from Penpot, Figma, or create your own following the W3C DTCG spec:

/* Don't import @btlb/tokens */
/* Import your custom tokens instead */
@import './my-penpot-tokens.css' layer(tokens);

/* Then use BTLB layers that consume those tokens */
@import '@btlb/baseline';
@import '@btlb/layouts';

Source JSON Files

The source W3C Design Token JSON files are included in tokens/:

tokens/
├── primitives/
│   ├── colors.json
│   ├── spacing.json
│   ├── typography.json
│   ├── radii.json
│   ├── shadows.json
│   └── motion.json
└── semantic/
    ├── colors.json
    ├── spacing.json
    └── typography.json

You can import these in your own Style Dictionary build if you want to extend or modify them.

W3C DTCG Format

All tokens follow the W3C Design Tokens Community Group format:

{
  "color": {
    "$type": "color",
    "blue": {
      "500": {
        "$value": "#3b82f6",
        "$description": "Primary blue"
      }
    }
  }
}

Token references use curly brace syntax:

{
  "color": {
    "bg": {
      "interactive": {
        "$value": "{color.blue.600}"
      }
    }
  }
}

License

MIT