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

react-native-unified-icons

v1.0.0

Published

A unified interface for various icon sets in React Native

Readme

React Native Unified Icons

A unified interface for various icon sets in React Native, leveraging @expo/vector-icons (which internally uses react-native-vector-icons). This package provides type-safe icon selection across multiple icon libraries with a clean, consistent API.

Installation

npm install react-native-unified-icons
# or
yarn add react-native-unified-icons

Prerequisites

This package requires the following peer dependencies:

  • react
  • react-native
  • @expo/vector-icons

Note: @expo/vector-icons internally uses react-native-vector-icons, so you'll get all the benefits of both libraries.

Usage

Basic Usage

import { Icon } from 'react-native-unified-icons';

// Using AntDesign icons
<Icon
  select={{
    from: "antdesign",
    name: "stepforward"
  }}
  size={24}
  color="black"
/>

// Using Material icons
<Icon
  select={{
    from: "material-icons",
    name: "access-alarm"
  }}
  size={24}
  color="red"
/>

With NativeWind

If you're using NativeWind for styling, you can utilize Tailwind classes for colors and other styles. This is particularly useful when working with custom themes:

// Basic NativeWind usage
<Icon
  select={{
    from: "antdesign",
    name: "heart"
  }}
  className="!text-primary"  // Using your theme's primary color
  size={24}
/>

// Using important modifier for style precedence
<Icon
  select={{
    from: "material-icons",
    name: "favorite"
  }}
  className="!text-secondary"  // Forces the secondary color
  size={24}
/>

// Complex styling example
<Icon
  select={{
    from: "ionicons",
    name: "notifications"
  }}
  className="text-warning dark:text-warning-dark !font-bold"
  size={24}
/>

Supported Props

| Prop | Type | Required | Description | Example | | ----------- | ---------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- | | select.from | IconType | Yes | The icon library to use. Options: 'antdesign', 'material-icons', 'ionicons', 'feather', 'evilicons', 'entypo', 'fontawesome6' | from: "antdesign" | | select.name | IconNameType<T> | Yes | The name of the icon from the selected library. Type-safe based on the chosen library. | name: "stepforward" | | size | number | No | The size of the icon in pixels. | size={24} | | color | string | No | The color of the icon. Can be any valid color string. | color="red" | | className | string | No | NativeWind classes for styling (if using NativeWind). | className="text-primary" | | style | StyleProp<TextStyle> | No | Additional React Native styles. | style={{ marginRight: 10 }} |

All other TextProps from React Native's Text component are also supported, except for 'children'.

Supported Icon Libraries

This package provides access to all icon sets available in @expo/vector-icons:

| Library | Import Key | Example Usage | Description | | ----------------- | ------------------- | --------------------------- | ---------------------------------------- | | AntDesign | antdesign | from: "antdesign" | Clean and modern icons from Ant Design | | Material Icons | material-icons | from: "material-icons" | Google's Material Design icons | | Ionicons | ionicons | from: "ionicons" | Premium icons for iOS, Android & Web | | Feather | feather | from: "feather" | Simply beautiful open source icons | | EvilIcons | evilicons | from: "evilicons" | Simple and clean icon set | | Entypo | entypo | from: "entypo" | Over 250 carefully crafted premium icons | | FontAwesome 6 | fontawesome6 | from: "fontawesome6" | Latest version of FontAwesome icons | | FontAwesome 5 | fontawesome5 | from: "fontawesome5" | FontAwesome 5 icon set | | FontAwesome | fontawesome | from: "fontawesome" | Original FontAwesome icon set | | Fontisto | fontisco | from: "fontisco" | The iconic font and CSS toolkit | | Foundation | foundation | from: "foundation" | Iconic fonts for Foundation Framework | | Octicons | octicons | from: "octicons" | GitHub's icon set | | Simple Line Icons | simple-line-icons | from: "simple-line-icons" | Simple and elegant line icons | | Zocial | zocial | from: "zocial" | Social and brand icons |

TypeScript Support

The package is written in TypeScript and provides full type safety. The icon names are typed based on the selected library, providing autocomplete and type checking in supported IDEs.

// This will show type errors if the icon name doesn't exist in the selected library
<Icon
  select={{
    from: "antdesign",
    name: "invalid-icon-name", // TypeScript error
  }}
/>

License

MIT