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

@abundiko/rn-genicons

v0.4.0

Published

generate icons for react native

Readme

@abundiko/rn-genicons

Quickly generate thin, high-performance and adaptive icon components for React Native from SVG files. Supports standard StyleSheet, NativeWind v2 (v4, v5 [BETA]), and Uniwind.

Example usage screenshot

NOTE

this package depends on react-native-svg so you must have configured it first

Table of Contents

Features

  • 🚀 High Performance: Generates a single file with optimized icon components.
  • 🎨 Style Support: Seamless integration with NativeWind, UniWind, and standard React Native StyleSheet.
  • 📦 TS/JS Support: Automatically generates .tsx, .jsx, or .js files with appropriate types.
  • 🛠️ Configurable: Setup via CLI, package.json, or .rc file.
  • 🌈 Customizable: Optional SVG size reset and color neutralization.

Installation

npm install @abundiko/rn-genicons --dev

or

bun add @abundiko/rn-genicons -d

Configuration

You can configure rn-genicons using multiple methods. We recommend using package.json for persistent configuration.

Parameters

| Option | CLI Flag | Description | Default | | ------------------------ | ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | | in | -i, --in | Required. Path to the folder containing your .svg icons. | - | | out | -o, --out | Required. Path to the generated output file (must end in .js, .jsx, or .tsx). | - | | style | -s, --style | Required. Styling system to use: stylesheet, uniwind, nativewindv2, nativewindv4, nativewindv5. | - | | name | -n, --name | The name of the exported object containing all icons. | Icons | | alias | -a, --alias | the full folder path with alias to use for SVG imports (useful if your SVGs are in a different module). eg: @/assets/images/icons | (Auto-relative) | | svgFullSize | --svg-full-size | If true, resets width and height of SVGs to 100%. This allows you to specify a width and height with style or className. | false | | unsafeNeutralizeColors | --unsafe-neutralize-colors | ⚠️ If true, replaces all hex colors for fill and stroke with currentColor. keep multi-colored icons in a seperate folder to avoid loss or colors. | false |


Method 1: package.json (Recommended)

Add a rn-genicons key to your package.json:

{
  "name": "your-app",
  "scripts": {
    "icons": "rn-genicons"
  },
  "rn-genicons": {
    "in": "./assets/icons",
    "out": "./src/components/Icons.tsx",
    "style": "nativewindv4",
    "svgFullSize": true
  }
}

Then run:

npm run icons

Method 2: CLI Arguments

npx rn-genicons -i ./icons -o ./src/Icons.tsx -s nativewindv5 --svg-full-size true

Method 3: .rn-geniconsrc File

Create a .rn-geniconsrc (JSON or YAML) in your project root:

{
  "in": "./assets/svgs",
  "out": "./src/generated/icons.js",
  "style": "stylesheet"
}

Usage in App

Once generated, use your icons easily:

import { Icons } from "./src/components/Icons";

function App() {
  return (
    <Icons.Home
      className="text-blue-500 w-10 h-10" // Works if style is nativewind or uniwind
      style={{ marginTop: 10 }}
    />
  );
}

Best Practices

  • make sure you have configured react-native-svg first.

  • use snake_casing and avoid special characters in your svg files' names.

License

MIT