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

@centrodphlibs/vanilla-extract-theme

v0.0.6

Published

Vanilla-extract theme tokens based on @centrodphlibs/theme

Readme

@centrodphlibs/vanilla-extract-theme

Vanilla-extract theme tokens package based on @centrodphlibs/theme. Provides type-safe CSS variables that can be consumed by vanilla-extract components.

Installation

npm install @centrodphlibs/vanilla-extract-theme

Usage

Import Theme CSS

First, import the theme CSS file to ensure theme variables are available:

import '@centrodphlibs/vanilla-extract-theme/style.css';

Using Theme Tokens

Import and use theme tokens in your vanilla-extract styles:

import { style } from '@vanilla-extract/css';
import { themeTokens } from '@centrodphlibs/vanilla-extract-theme';

export const myComponent = style({
  backgroundColor: themeTokens.colors.primary,
  color: themeTokens.colors.text,
  padding: themeTokens.spacing.m,
});

Using Theme Variables Directly

You can also access theme variables directly:

import { style } from '@vanilla-extract/css';
import { theme } from '@centrodphlibs/vanilla-extract-theme';

export const myComponent = style({
  backgroundColor: theme.colors.primary,
  color: theme.colors.text,
  padding: theme.spacing.m,
});

Example: Button Component

import { style } from '@vanilla-extract/css';
import { themeTokens } from '@centrodphlibs/vanilla-extract-theme';

export const button = style({
  backgroundColor: themeTokens.colors.primary,
  color: themeTokens.colors.text,
  padding: `${themeTokens.spacing.m} ${themeTokens.spacing.l}`,
  borderRadius: '4px',
  border: `1px solid ${themeTokens.colors.border}`,
  
  ':hover': {
    backgroundColor: themeTokens.colors.secondary,
  },
});

Available Theme Tokens

Colors:

  • themeTokens.colors.primary - Primary color (#0b21b4)
  • themeTokens.colors.secondary - Secondary color (#6b7280)
  • themeTokens.colors.success - Success color (#10b981)
  • themeTokens.colors.warning - Warning color (#f59e0b)
  • themeTokens.colors.error - Error color (#ef4444)
  • themeTokens.colors.info - Info color (#3b82f6)
  • themeTokens.colors.background - Background color (#ffffff)
  • themeTokens.colors.surface - Surface color (#f9fafb)
  • themeTokens.colors.text - Primary text color (#111827)
  • themeTokens.colors.textSecondary - Secondary text color (#6b7280)
  • themeTokens.colors.border - Border color (#e5e7eb)

Spacing:

  • themeTokens.spacing.s - Small spacing (2px)
  • themeTokens.spacing.m - Medium spacing (4px)
  • themeTokens.spacing.l - Large spacing (6px)

TypeScript

Full TypeScript support is included. Theme tokens are fully typed and provide autocomplete support.

Related Packages

  • @centrodphlibs/theme - Base theme data package
  • @centrodphlibs/button-vanilla-extract - Button component using vanilla-extract

Running unit tests

Run nx test vanilla-extract-theme to execute the unit tests via Vitest.