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

fig2r

v0.1.3

Published

Convert Figma designs to pixel-perfect React + Tailwind components

Readme

fig2r

Figma → pixel-perfect React + Tailwind, from your terminal. Built for AI coding agents.

npm downloads license

Point fig2r at a Figma node URL. It fetches the design, downloads every asset, and writes idiomatic React + Tailwind components you — or your agent — can drop into Next.js, Vite, or Remix.

The output is a reference, not a final component. Your agent then rewires it to match your project's design system, tokens, and components.

Install

npm install -g fig2r

Set a Figma token (scope file_content:read):

fig2r auth figd_xxxxxxxxxxxx
# or: export FIGMA_TOKEN=figd_xxx

Quick start

fig2r fetch "https://www.figma.com/design/FILE/Name?node-id=123-456" \
  --save ./components \
  --public-dir ./public

That's it. Open ./components/.tsx files ready to import.

Commands

fig2r fetch <url> --save <dir>   # Figma → components + assets
fig2r fetch <url>                # stream IR JSON to stdout
fig2r convert <ir.json> -o <dir> # IR JSON → components (offline)
fig2r validate <ir.json>         # schema check
fig2r auth <token>               # save token to ~/.fig2r/config.toml

Useful flags: --public-dir, --svg-mode {react-component|file|inline}, --naming {pascal|kebab}, --no-theme. convert also accepts --strict (fail on any unsupported construct, for CI). See fig2r <cmd> --help.

Agent skill (auto-linked)

On install, fig2r symlinks a bundled skill into any agent skill directory it finds:

  • ~/.claude/skills/fig2r — Claude Code
  • ~/.agents/skills/fig2r — Cursor, Codex, Aider, Cline

Your agent reads the skill and knows the whole workflow: fetch into /tmp, read the reference, adapt to the target project (shadcn, Radix, custom tokens, next/font, etc.), dedupe assets, verify.

Opt out with FIG2R_SKIP_SKILL_INSTALL=1 npm install -g fig2r. Uninstall with rm ~/.claude/skills/fig2r ~/.agents/skills/fig2r.

What it handles

Flex + grid auto-layout, absolute positioning, z-index, padding/gap, per-side borders, rounded corners, solid/gradient/image fills, drop + inner shadows, blur, blend modes, opacity, rotation, flip, aspect ratio, variants, component properties, rich text, OpenType features, next/font/google, SVG paths, parallel asset download.

Known limits

  • strokeGeometry paths not rendered (use fillGeometry)
  • Per-paint blendMode / imageTransform not honored
  • Figma Variables flattened to resolved colors — mode switching not round-tripped
  • Bullet/numbered text lists render as <span>•</span> + text, not semantic <ul>/<ol>/<li>
  • paragraphSpacing emits a warning instead of wrapping paragraphs in <p> tags
  • Gradient strokes fall back to the first stop's solid color; conic (GRADIENT_ANGULAR) approximated as linear
  • Image fill filters (exposure/contrast/saturation) not applied in CSS
  • React-only (no Vue / Svelte / SwiftUI)

License

MIT © Taradepan R