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

flexa-design-system

v2.9.1

Published

Flexa Design System (FDS) — a zero-runtime, WCAG-gated design token system: DTCG token source, 3-tier token contract (ref → semantic → component), theme model with light/dark modes, contrast gate, and a pure token->var() CSS pipeline. Pure data + pure fun

Readme

Flexa Design System (FDS)

npm downloads minzipped license

📖 Documentation, token reference & live playground → fds.sitebefy.com

A zero-runtime, WCAG-gated design token system. FDS is the design foundation of Flexa Builder, packaged so any project — with or without Flexa — can use it: pure data (a DTCG token source) plus pure functions (theme emission, token resolution, contrast checking). No framework, no runtime, no dependencies.

FDS is not a utility-class framework (Tailwind) and not a component source library (shadcn). Its closest relatives are Radix Colors + Open Props + Style Dictionary: a CSS-variables token layer with a strict naming contract, plus the pipeline that turns token references into var(--fx-*) strings at build time.

Install

npm install flexa-design-system

Or use the CSS directly, no build step:

<link rel="stylesheet" href="https://unpkg.com/flexa-design-system/dist/theme.css">
<link rel="stylesheet" href="https://unpkg.com/flexa-design-system/dist/base-typography.css">

The 30-second tour

Three token tiers — only the bottom one holds raw values:

| Tier | CSS prefix | Public id | Role | |---|---|---|---| | Primitive (ref) | --fx-ref-* | ref.brand.600 | Raw scales; only tier with literals | | Semantic | --fx-* | color.primary, space.4 | Intent-named aliases — what you use | | Component | --fx-c-* | c.button.radius | Narrow aliases for one component |

Re-theming = re-pointing aliases. Elements only ever read semantic tokens, so a theme swap never touches a component.

/* theme.css gives you the whole variable surface */
.card {
  background: var(--fx-color-surface);
  color: var(--fx-color-text);
  padding: var(--fx-space-6);
  border-radius: var(--fx-radius-lg);
  box-shadow: var(--fx-shadow-md);
}

Dark mode is one attribute — every X / on-X pair is contrast-checked (WCAG 2.2 AA) in CI, so it stays readable:

<html data-fx-scheme="dark">

JS API

Everything is a pure function over the token registry.

import {
  FDS_TOKENS, FDS_VERSION, hasToken, getToken, tokenIdToCssVar,
  defaultTheme, emitTheme, emitBaseTypography,
  resolveStyleTokens, checkThemeContrast,
} from 'flexa-design-system';

tokenIdToCssVar('color.on-primary');   // '--fx-color-on-primary'
hasToken('space.4');                   // true

// Emit a complete theme stylesheet (light + dark + prefers-* blocks):
const css = emitTheme(defaultTheme());

// Rewrite bare token ids inside a style spec into var() strings
// (this is how Flexa keeps its CSS compiler token-agnostic):
resolveStyleTokens({ '.btn': { background: 'color.primary' } }, hasToken);
// → { '.btn': { background: 'var(--fx-color-primary)' } }

// Gate a custom theme against the WCAG pairs:
checkThemeContrast(myTheme); // [] means every pair passes AA

WordPress bridge (emitWpTheme, wpThemeJson) aliases FDS semantic vars onto --wp--preset--* so FDS sits on top of theme.json instead of fighting it.

Design token source (DTCG)

The single source of truth is a W3C Design Tokens (DTCG) document. Consume it with your own pipeline (Style Dictionary etc.):

import tokens from 'flexa-design-system/fds.tokens.json';

Every TS constant, CSS artifact, and the PHP mirror inside Flexa Builder is generated from this file — outputs never drift from the source.

Versioning

The package version is the token-contract version (FDS_VERSION, semver): adding tokens is a minor bump; renaming or removing a semantic token is a major bump. Anything built against FDS 2.x keeps working on every 2.x host.

License

MIT