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

@crbroughton/unocss-token-system

v2.0.0

Published

A UnoCSS token system utility

Readme

UnoCSS Token System

A simple and flexible token system for UnoCSS, allowing you to define and manage your design tokens while providing utility classes for spacing, colours, sizes, and more.

Installation

npm install @crbroughton/unocss-token-system

Usage

import { defineTokenSystem } from '@crbroughton/unocss-token-system'
import { defineConfig } from 'unocss'

const preset = defineTokenSystem({
  name: 'my-design-system',
  zindex: {
    10: 10,
    20: 20,
    '-20': '-20',
  },
  spacing: {
    sm: '8px',
    md: '16px',
    lg: '24px',
  },
  rounded: {
    sm: '4px',
    md: '8px',
    lg: '16px',
  },
  sizes: {
    sm: '100px',
    md: '200px',
    lg: '300px',
    full: '100%',
  },
colors: {
    // Theme colours generate dynamic utilities that use CSS variables.
    // The preset will create a preflight that injects CSS variables for the default
    // theme (applied on :root) and additional themes using a corresponding class.
    primary: {
      themes: {
        light: '#ffffff',
        dark: '#111111',
        forest: '#2f4f4f',
        ocean: '#000080',
      },
    },
    secondary: {
      themes: {
        light: '#334155',
        dark: '#222222',
        forest: '#2f4f4f',
        ocean: '#000080',
      },
    },
  },
  allowArbitraryValues: true,
})

export default defineConfig({
  presets: [
    preset,
    // ... other presets
  ],
})

Features

Here's a comparison table of Tailwind features and our current support status:

| Category | Feature | Supported | Notes | |----------|---------|-----------|--------| | Layout | Flexbox | ✅ | Full flexbox support including display, direction, wrap, justify, align | | Layout | Grid | ✅ | Complete grid support with templates, auto-flow, spans | | Layout | Position | ✅ | Static, fixed, absolute, relative, sticky | | Layout | Top/Right/Bottom/Left | ✅ | Uses spacing tokens | | Layout | Z-index | ✅ | Uses zindex tokens | | Spacing | Margin | ✅ | All directions, auto values, uses spacing tokens | | Spacing | Padding | ✅ | All directions, uses spacing tokens | | Spacing | Gap | ✅ | Uses spacing tokens for grid/flex gap | | Colors | Background | ✅ | Multi-theme support | | Colors | Text | ✅ | Multi-theme support | | Borders | Width | ✅ | Uses border tokens | | Borders | Color | ✅ | Multi-theme support | | Borders | Style | ✅ | Solid, dashed, dotted, none | | Borders | Radius | ✅ | Uses rounded tokens | | Outlines | Width | ✅ | Uses border tokens | | Outlines | Color | ✅ | Multi-theme support | | Outlines | Style | ✅ | Solid, dashed, dotted, none | | Sizing | Width | ✅ | Uses size tokens | | Sizing | Height | ✅ | Uses size tokens | | Typography | Font Family | ✅ | Uses font tokens | | Typography | Font Size | ✅ | Uses size tokens | | Typography | Font Weight | ✅ | Uses weight tokens | | Typography | Line Height | ✅ | Uses line height tokens | | Typography | Text Align | ✅ | Left, center, right, justify | | Effects | Box Shadow | ✅ | Uses shadow tokens | | Effects | Opacity | ✅ | Uses opacity tokens | | Transforms | Scale/Rotate/Translate | ❌ | Not implemented yet | | Transitions | Duration/Timing/Property | ❌ | Not implemented yet | | Interactivity | Cursor | ❌ | Not implemented yet | | Interactivity | User Select | ❌ | Not implemented yet | | State Variants | Hover/Focus/Active | ✅ | Supports grouped variants like hover:(bg-primary) | | State Variants | Disabled/Checked | ✅ | Supports disabled and checked states | | Responsive | Breakpoints | ❌ | Not implemented yet | | Theme Support | Multi-theme | ✅ | Supports arbitrary number of themes | | Arbitrary Values | Square Brackets | ✅ | Optional feature for all supported properties |

Options

interface PresetOptions {
  name: string;                                        // Name of your design system
  zindex: Record<string, string | number>;            // z-index tokens
  spacing?: Record<string, string | number>;          // Spacing tokens
  rounded?: Record<string, string | number>;          // Border radius tokens
  sizes?: Record<string, string | number>;            // Width/height tokens
  colors?: Record<string, Record<string, string>>; // Color tokens
  allowArbitraryValues?: boolean;                     // Enable arbitrary values
}

License

MIT License