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

@cfxdevkit/theme

v2.1.9

Published

Design tokens and CSS layer.

Readme

@cfxdevkit/theme

Scope: Shared design tokens (colors, spacing, typography, shadows, motion) usable from any UI library.

No React, no CSS-in-JS dependency. Outputs JSON + CSS variables + (optional) Tailwind preset.

Install

npm install @cfxdevkit/theme

Sub-paths

| Sub-path | Exports | |----------|---------| | . | 13 symbols | | ./tokens | 6 symbols | | ./react | 6 symbols | | ./css | 0 symbols | | ./dark | 0 symbols |


.

Exports the full theme API, including tokens and React integration.

import { colors, spacing, radius, typography, shadow, motion, ThemeProvider, useTheme } from '@cfxdevkit/theme';
  • colors, spacing, radius, typography, shadow, motion: Raw design token objects.
  • ThemeProvider, useTheme: React context provider and hook for theme switching.

Example

import { ThemeProvider, useTheme } from '@cfxdevkit/theme';

function App() {
  return (
    <ThemeProvider defaultTheme="light">
      <Main />
    </ThemeProvider>
  );
}

function Main() {
  const { theme, resolvedTheme } = useTheme();
  // `theme`: user preference ('light' | 'dark' | 'system')
  // `resolvedTheme`: effective theme ('light' | 'dark')
  return <div style={{ color: colors.text.primary }}>Hello</div>;
}

./tokens

Exports only the raw design tokens (no React dependencies).

import { colors, spacing, radius, typography, shadow, motion } from '@cfxdevkit/theme/tokens';

Useful for non-React environments (e.g., vanilla JS, Storybook, Figma plugins).

Example

import { colors, spacing } from '@cfxdevkit/theme/tokens';

const buttonStyle = {
  backgroundColor: colors.primary.default,
  padding: spacing.md,
  borderRadius: radius.md,
};

./react

Exports only the React integration (context provider + hook).

import { ThemeProvider, useTheme } from '@cfxdevkit/theme/react';

Requires @cfxdevkit/theme to be installed separately for token access.

Example

import { ThemeProvider } from '@cfxdevkit/theme/react';
import { colors } from '@cfxdevkit/theme/tokens';

function App() {
  return (
    <ThemeProvider defaultTheme="system" storageKey="cfx-theme">
      <div style={{ color: colors.text.primary }}>Theme-aware content</div>
    </ThemeProvider>
  );
}

./css

No named exports. Used internally to generate CSS variable files.


./dark

No named exports. Used internally for dark-mode token variants.

Usage

import { colors, spacing, ThemeProvider, useTheme } from '@cfxdevkit/theme';

// Use tokens directly
const styles = {
  color: colors.text.primary,
  padding: spacing.lg,
};

// Or use React integration
function App() {
  return (
    <ThemeProvider defaultTheme="light">
      <Content />
    </ThemeProvider>
  );
}

function Content() {
  const { resolvedTheme } = useTheme();
  return <div>Current theme: {resolvedTheme}</div>;
}

API Reference

See API.md for the full public surface.

Tier

Tier 0 — framework — Must not runtime-import from any higher tier.