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

ui-foundations

v0.3.2

Published

Token-first UI foundations with CSS, tokens, and React exports.

Downloads

407

Readme

UI Foundations

A token-first design system that uses Figma as the single source of truth and automatically generates CSS, JSON, and TypeScript tokens.

Pipeline

Figma Variables → Plugin Export → figma/exports/*.tokens.json → extract-tokens.js → dist/ (CSS, JSON, TS, YAML)

Features

  • 5 variable collections: Core Primitives, Themes (Brands), Appearance (Modes), Semantics (Roles), Components (UI)
  • Multi-brand support (Brand A/B) via data-brand selectors
  • Dark/light mode via data-mode selectors
  • Content-based scope detection (independent of filenames)
  • Figma plugin with Validate + Export tabs (see figma/plugin/README.md)
  • CI pipeline: lint, unit tests, build, smoke check, docs build
  • Docs site with Eleventy, auto-generated from token data

Tech Stack

Vanilla CSS (Custom Properties, Layers), Node.js scripts, Eleventy, Figma Plugin API, MCP.

Install

npm install ui-foundations

Usage

import "ui-foundations/core.css";
import "ui-foundations/ui.css";

Runtime scope switching:

const root = document.documentElement;
root.dataset.brand = "a"; // "a" | "b"
root.dataset.mode = "light"; // "light" | "dark"

Local Development

npm run build:all       # generate tokens + build CSS
npm run docs:dev        # build + serve docs site

Figma sync workflow:

# 1. Export tokens via Figma plugin (📦 Export tab)
# 2. Place JSON files in figma/exports/
# 3. Build
npm run build:all

Validation:

npm run lint
npm run test:unit
npm run ci:check

MCP Integration

This repo supports Figma integration via MCP (Model Context Protocol). Two servers are used:

  • figma-developer-mcp — REST API read access (requires FIGMA_TOKEN in .env)
  • Figma Desktop MCP — local server via Figma Desktop app (enable in Dev Mode inspect panel)

Configure these in your agent's MCP config. Example for the REST API server:

{
  "command": "npx",
  "args": ["-y", "figma-developer-mcp", "--figma-api-key=YOUR_TOKEN", "--stdio"]
}

Documentation

  • Foundations: docs/foundations/
  • AI playbook: docs/agentic/team-ai-playbook.md
  • Figma plugin (Token Foundry): figma/plugin/README.md
  • Docs site: site/
  • Vanilla starter: site/examples/vanilla-starter.md

Release

npm run release:patch   # or release:minor / release:major
npm run release:push
npm run release:publish