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

@via-ds/tokens

v0.1.0

Published

Design tokens for the Via Design System

Readme

@via-ds/tokens

Design tokens for the via-ds design system.

Installation

pnpm add @via-ds/tokens

Usage

CSS Custom Properties

Import the token CSS tokens

@import '@via-ds/tokens/fonts.css';
@import '@via-ds/tokens/tokens.css';

Use the tokens as CSS custom properties:

.button {
  background-color: var(--color-light-background-primary);
  color: var(--color-light-text-primary);
  padding: var(--space-200);
  font: var(--typography-body);
}

JavaScript / TypeScript

Import tokens directly in JS/TS:

import lightTokens from '@via-ds/tokens/light.tokens';
import spacingTokens from '@via-ds/tokens/spacing.tokens';

// Access token values
const bgColor = lightTokens.color.background.primary.$value; // "#ffffff"

Token Naming

Primitive Tokens

Primitive tokens are the base color palette without theme prefixes:

--color-gray-light3
--color-blue-base
--color-green-dark1

Semantic Color Tokens (Light/Dark)

Semantic tokens include the theme name in their CSS variable:

--color-light-background-primary
--color-light-text-secondary
--color-dark-background-primary
--color-dark-text-secondary

Spacing Tokens

Spacing tokens follow a numeric scale:

--space-100  /* 4px */
--space-200  /* 8px */
--space-400  /* 16px */

Font Tokens

Font family tokens define the typefaces:

--font-family-body       /* Euclid Circular A */
--font-family-serif      /* MongoDB Value Serif */
--font-family-monospace  /* Source Code Pro */

Font size tokens define the type scale:

--font-size-small     /* 11px */
--font-size-base      /* 13px */
--font-size-heading1  /* 48px */

Typography Tokens

Typography tokens are shorthand font values combining weight, size, line-height, and family:

--typography-heading1  /* 400 48px/1.33em serif */
--typography-body      /* 400 13px/1.5em body */
--typography-code      /* 400 13px/1.5em monospace */

Use typography tokens with the CSS font shorthand property:

.heading {
  font: var(--typography-heading1);
}

Tailwind v4

Import the Via theme to generate utility classes from all Via tokens:

@import 'tailwindcss';
@import '@via-ds/tokens/tailwind.css';

This registers all tokens with Tailwind's @theme directive. Utility classes are generated automatically based on the variable namespace:

<button class="bg-green-base text-black p-400 rounded-200 font-body">
  Hello Via!
</button>
<div
  class="bg-dark-background-primary text-dark-text-primary border border-dark-border-primary rounded-300 p-400"
>
  Dark mode card
</div>

| Token category | CSS variable | Example classes | | ------------------ | ---------------------------- | -------------------------------------------------------- | | Colors (primitive) | --color-green-base | bg-green-base, text-green-base, border-green-base | | Colors (semantic) | --color-light-text-primary | text-light-text-primary, bg-light-background-primary | | Spacing | --spacing-400 | p-400, px-200, m-600, gap-300 | | Border radius | --radius-200 | rounded-200, rounded-300 | | Font family | --font-body | font-body, font-serif, font-monospace | | Font size | --text-heading1 | text-heading1, text-base, text-small | | Shadow | --shadow-light-default | shadow-light-default | | Duration | --duration-default | duration-default, duration-faster |

Note: Color semantic tokens include the theme name (light/dark). Use Tailwind's dark: variant to apply dark-mode tokens when the user's system preference is dark:

<div
  class="bg-light-background-primary text-light-text-primary
            dark:bg-dark-background-primary dark:text-dark-text-primary
            border border-light-border-primary dark:border-dark-border-primary
            rounded-300 p-400"
>
  Adaptive card
</div>

Build Process

To rebuild tokens after modifying source files:

pnpm build

The build uses Style Dictionary to transform DTCG-format tokens in src/ into CSS and JavaScript output in dist/.