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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@pixelforge-ui/core

v0.4.3

Published

Design tokens and theming utilities for PixelForge UI component library. A bold, brutalist design system with comprehensive tokens for colors, typography, spacing, and themes. Documentation: https://pixelforge-ui.github.io/pixelforge-ui/

Downloads

9

Readme

@pixelforge-ui/core

PixelForge UI Cover

Design tokens and theming utilities for PixelForge UI component library.

Installation

npm install @pixelforge-ui/core

Features

  • 🎨 Design Tokens - Comprehensive color scales, typography, spacing, and more
  • 🌙 Theme System - Light/dark mode with system preference detection
  • CSS Variables - Runtime theming with CSS custom properties
  • 🎯 TypeScript - Full type safety for all tokens and utilities
  • 🔧 Framework Agnostic - Use with any CSS-in-JS solution or plain CSS

Quick Start

Basic Usage

import { defaultTokens, ThemeProvider, useTheme } from '@pixelforge-ui/core';

// Use design tokens directly
console.log(defaultTokens.colors.primary[500]); // '#3b82f6'
console.log(defaultTokens.spacing[4]); // '16px'

// React theme provider
function App() {
  return (
    <ThemeProvider defaultMode="system">
      <YourApp />
    </ThemeProvider>
  );
}

// Use theme in components
function MyComponent() {
  const { mode, setMode, tokens } = useTheme();
  
  return (
    <div style={{ color: tokens.colors.text.primary }}>
      <button onClick={() => setMode(mode === 'light' ? 'dark' : 'light')}>
        Toggle theme
      </button>
    </div>
  );
}

CSS Variables

import { tokensToCSS } from '@pixelforge-ui/core';

// Generate CSS variables
const cssVars = tokensToCSS(defaultTokens);
// Results in: { '--pf-color-primary-500': '#3b82f6', ... }

// Use in your CSS
const styles = `
  .button {
    background: var(--pf-color-primary-500);
    padding: var(--pf-spacing-3) var(--pf-spacing-4);
    border-radius: var(--pf-radius-md);
  }
`;

Design Tokens

Colors

  • Primary, Secondary, Accent - Full 50-950 color scales
  • Gray, Success, Warning, Danger - Semantic color scales
  • Text & Border - Contextual colors for UI elements

Typography

  • Font Families - Sans, serif, mono stacks
  • Font Sizes - xs to 6xl responsive scale
  • Font Weights - Thin to black (100-900)
  • Line Heights & Letter Spacing - Optimized for readability

Spacing & Layout

  • Spacing Scale - 0 to 64px in consistent increments
  • Border Radius - None to full rounded corners
  • Shadows - Subtle to dramatic elevation
  • Z-Index - Layered component stacking

Motion

  • Duration - Instant to slower timing
  • Easing - Linear, ease-in/out, bounce, elastic

TypeScript Support

All tokens are fully typed for excellent developer experience:

import type { DesignTokens, Colors } from '@pixelforge-ui/core';

// Autocomplete and type safety
const colors: Colors = defaultTokens.colors;
const primaryBlue: string = colors.primary[500]; // ✅ Type-safe

Theme Customization

import { defaultTokens, type DesignTokens } from '@pixelforge-ui/core';

// Override specific tokens
const customTokens: DesignTokens = {
  ...defaultTokens,
  colors: {
    ...defaultTokens.colors,
    primary: {
      ...defaultTokens.colors.primary,
      500: '#8b5cf6', // Custom purple
    },
  },
};

// Use with ThemeProvider
<ThemeProvider tokens={customTokens}>
  <App />
</ThemeProvider>

Package Info

  • Bundle Size: ~13KB (CJS) / ~12KB (ESM)
  • Dependencies: React (peer dependency)
  • License: MIT
  • TypeScript: Full support with declarations

Related Packages


Built with ❤️ by the PixelForge team