Phosphor Icons for React Native

3.0.4 · active · verified Tue Apr 21

Phosphor React Native is a library providing a flexible, open-source icon family for React Native applications, compatible with both iOS and Android platforms. The current stable version is 3.0.4, with releases occurring semi-regularly, typically every few months for minor updates or bug fixes, and major versions (like v3.0.0) introducing breaking changes less frequently. Key differentiators include its extensive collection of icons available in six distinct weights (thin, light, regular, bold, fill, duotone), robust TypeScript support, efficient tree-shaking to minimize bundle size, and a powerful React Context API for applying global styling configurations. It's heavily inspired by the web-focused `phosphor-react` library, bringing the same aesthetic and functionality to the React Native ecosystem.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates basic icon usage, custom styling with individual props, and global styling via `IconContext.Provider`.

import React from 'react';
import { View, StyleSheet } from 'react-native';
import { IconContext, HorseIcon, HeartIcon, CubeIcon } from 'phosphor-react-native';

const App = () => {
  return (
    <IconContext.Provider
      value={{
        color: 'limegreen',
        size: 32,
        weight: 'bold'
      }}
    >
      <View style={styles.container}>
        {/* Inherits context values: limegreen, 32px, bold */}
        <HorseIcon />
        {/* Overrides context: uses #AE2983, 32px, fill */}
        <HeartIcon color="#AE2983" weight="fill" size={32} />
        {/* Overrides context: uses teal, 32px, duotone */}
        <CubeIcon color="teal" weight="duotone" />
      </View>
    </IconContext.Provider>
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    flexDirection: 'row',
    gap: 20,
    backgroundColor: '#f0f0f0'
  }
});

export default App;

view raw JSON →