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

f02k

v2.0.0

Published

Generate complete React Native / Expo design systems from a single base color

Readme

f02k

Generate complete React Native / Expo design systems from a single base color.

npx f02k init

Features

  • Color scales — Generate 11-stop (50–950) color scales from one base color
  • Light + Dark — Full semantic token sets for both modes
  • Design tokens — Background, surface, text, border, primary, success, warning, danger, info, and more
  • Typography system — 8 sizes × 4 weights, fully tokenized
  • Spacing scale — 14-step spacing tokens
  • Radius presets — sharp, default, rounded, pill
  • Theme presets — apple, material3, linear, github, notion, stripe
  • Neutral families — zinc, slate, gray, stone, neutral
  • Component registry — Install individual components: button, input, card, badge, avatar, modal, switch
  • ThemeProvider + useTheme — Fully typed React Native context with system/light/dark mode
  • TypeScript — Strict, full type safety, no any

Quick Start

# Create a new Expo project
npx create-expo-app my-app
cd my-app

# Initialize f02k
npx f02k init

# Install some components
npx f02k add button card input

# Regenerate with a different color later
npx f02k generate --color "#6366f1"

CLI Commands

f02k init

Initializes a design system in your project.

npx f02k init --color "#2563EB" --preset material3 --radius rounded --neutral slate

Options: | Flag | Default | Description | |------|---------|-------------| | -c, --color | #2563EB | Base color in hex | | -p, --preset | material3 | Theme preset | | -r, --radius | default | Radius preset | | -n, --neutral | neutral | Neutral color family | | -o, --output | . | Output directory |

f02k generate

Regenerate theme tokens from a new base color.

npx f02k generate --color "#ef4444"

f02k add

Install registry components.

npx f02k add button
npx f02k add card input badge

f02k list

List all available registry components.

npx f02k list

Generated Structure

src/theme/
├── tokens/
│   ├── tokens.ts        # Semantic tokens (light + dark)
│   └── palettes.ts      # Color palettes (light + dark)
├── providers/
│   └── theme-provider.tsx  # ThemeProvider + useTheme
├── hooks/
│   └── use-theme.ts     # Re-export of useTheme
├── components/          # Installed components
│   ├── button.tsx
│   ├── card.tsx
│   └── ...
└── index.ts

Usage in React Native

import { ThemeProvider, useTheme } from "./src/theme";

function App() {
  return (
    <ThemeProvider>
      <MyScreen />
    </ThemeProvider>
  );
}

function MyScreen() {
  const { tokens, mode, toggleMode } = useTheme();

  return (
    <View style={{ backgroundColor: tokens.background }}>
      <Text style={{ color: tokens.text }}>Hello</Text>
    </View>
  );
}

Semantic Tokens

| Token | Purpose | |-------|---------| | background | App background | | surface | Card/surface background | | surfaceSecondary | Secondary surface | | card | Card container | | text | Primary text | | textSecondary | Secondary text | | textMuted | Muted/placeholder text | | textDisabled | Disabled text | | border | Borders | | divider | Dividers | | primary | Brand color | | primaryForeground | Text on primary | | primarySoft | Soft primary bg | | success / warning / danger / info | Semantic colors | | input | Input background | | inputBorder | Input border | | inputFocus | Input focus border | | overlay | Modal overlay | | shadow | Shadow color |

Available Components

  • button — Pressable with variants (primary, secondary, outline, ghost) and sizes (sm, md, lg)
  • input — Text input with label, focus state, error display
  • card — Container with default/elevated/outlined variants
  • badge — Status label with semantic color variants
  • avatar — Image or initials with size variants
  • modal — Overlay dialog with size variants (sm, md, lg, full)
  • switch — Toggle switch using semantic colors

License

MIT