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

@yuva-devlab/tokens

v0.1.2

Published

[![npm version](https://img.shields.io/npm/v/@yuva-devlab/tokens.svg)](https://www.npmjs.com/package/@yuva-devlab/tokens) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)

Downloads

26

Readme

🎨 @yuva-devlab/tokens

npm version License: MIT

Design system tokens built with Vanilla Extract, providing a comprehensive foundation for consistent UI development.

Features

  • 🎨 Automated Tonal Palettes - Material Design 3 inspired color generation
  • 🌓 Light/Dark Themes - Semantic color tokens that adapt to theme
  • 📏 Systematic Spacing - Consistent scale from 2xs to 5xl
  • 📝 Typography Scale - Harmonious type system
  • 🎯 Zero Runtime - All tokens compiled to CSS variables at build time
  • 🔒 Type-Safe - Full TypeScript autocomplete for all tokens

Installation

# npm
npm install @yuva-devlab/tokens

# yarn
yarn add @yuva-devlab/tokens

# pnpm
pnpm add @yuva-devlab/tokens

Zero runtime dependencies - All tokens are compiled to static CSS at build time.

Token Categories

Colors

  • Tonal Palettes - 13-shade palettes for primary, secondary, tertiary, neutral, and error
  • Semantic Colors - Theme-aware tokens (background, surface, primary, etc.)
  • State Colors - Hover, active, and disabled states

Spacing

  • Scale: 2xs, xs, sm, md, lg, xl, 2xl, 3xl, 4xl, 5xl
  • Values: 4px to 96px in systematic increments

Typography

  • Sizes: xs, sm, md, lg, xl, 2xl, 3xl, 4xl, 5xl
  • Weights: light, regular, medium, semibold, bold
  • Line Heights: Optimized for readability

Other Tokens

  • Border Radius: sm, md, lg, xl, full
  • Shadows: sm, md, lg, xl
  • Z-Index: Layered system for overlays, modals, tooltips
  • Breakpoints: Responsive design breakpoints

Usage

In Vanilla Extract

import { vars } from "@yuva-devlab/tokens";
import { style } from "@vanilla-extract/css";

export const card = style({
  backgroundColor: vars.colors.surface,
  padding: vars.spacing.lg,
  borderRadius: vars.radii.md,
  boxShadow: vars.shadows.sm,

  // Typography
  fontSize: vars.typography.size.md,
  lineHeight: vars.typography.lineHeight.md,

  // Responsive
  "@media": {
    [vars.breakpoints.md]: {
      padding: vars.spacing.xl,
    },
  },
});

Importing CSS

// Import compiled CSS in your app entry point
import "@yuva-devlab/tokens/tokens.css";

Using CSS Variables Directly

.my-component {
  background-color: var(--colors-surface);
  padding: var(--spacing-md);
  border-radius: var(--radii-md);
}

Color System

Tonal Palettes

Each color has 13 shades (0-100 in increments of 10):

import { vars } from "@yuva-devlab/tokens";

// Primary palette
vars.palettes.primary[0]; // Lightest
vars.palettes.primary[50]; // Mid-tone
vars.palettes.primary[100]; // Darkest

// Available palettes:
// - primary (Natural green)
// - secondary
// - tertiary
// - neutral
// - neutralVariant
// - error

Semantic Colors

Theme-aware tokens that automatically adapt:

vars.colors.background; // Page background
vars.colors.surface; // Card/panel background
vars.colors.primary; // Primary brand color
vars.colors.onPrimary; // Text on primary
vars.colors.secondary; // Secondary color
vars.colors.error; // Error state
vars.colors.outline; // Borders

Spacing System

import { vars } from "@yuva-devlab/tokens";

vars.spacing["2xs"]; // 4px
vars.spacing.xs; // 8px
vars.spacing.sm; // 12px
vars.spacing.md; // 16px
vars.spacing.lg; // 24px
vars.spacing.xl; // 32px
vars.spacing["2xl"]; // 48px
vars.spacing["3xl"]; // 64px
vars.spacing["4xl"]; // 80px
vars.spacing["5xl"]; // 96px

Typography

import { vars } from "@yuva-devlab/tokens";

// Sizes
vars.typography.size.xs; // 12px
vars.typography.size.sm; // 14px
vars.typography.size.md; // 16px
vars.typography.size.lg; // 18px
vars.typography.size.xl; // 20px
vars.typography.size["2xl"]; // 24px
vars.typography.size["3xl"]; // 30px
vars.typography.size["4xl"]; // 36px
vars.typography.size["5xl"]; // 48px

// Weights
vars.typography.weight.light; // 300
vars.typography.weight.regular; // 400
vars.typography.weight.medium; // 500
vars.typography.weight.semibold; // 600
vars.typography.weight.bold; // 700

Development

# Build tokens
pnpm --filter @yuva-devlab/tokens build

# Watch mode
pnpm --filter @yuva-devlab/tokens dev

Architecture

Color Seeds (HSL)
      ↓
Tonal Palette Generation (MD3 algorithm)
      ↓
Semantic Token Mapping (Light/Dark)
      ↓
CSS Variables (Compiled by Vanilla Extract)
      ↓
Your Components

Related Packages

License

MIT © Yuva Devlab