Skip to main content

Adding New Icon Sets

React Icons supports adding new icon libraries. This guide explains the complete process from proposal to integration.

Before You Start

Before proposing a new icon set, check the New Icon Set Discussions to see if it’s already been requested.

Requirements Checklist

1

License compatibility

The icon pack must have an open-source license:
  • ✅ MIT
  • ✅ Apache 2.0
  • ✅ CC BY 4.0 / CC BY-SA 3.0
  • ✅ ISC
  • ✅ SIL OFL 1.1
  • ❌ Proprietary licenses
  • ❌ GPL (copyleft conflicts with MIT)
2

SVG source files

The icon pack must provide:
  • SVG source files (not just icon fonts)
  • Publicly accessible repository
  • Stable file structure
  • Consistent naming convention
3

Quality and scope

The icon pack should:
  • Have at least 50+ icons
  • Be actively maintained
  • Have a reasonable use case
  • Not duplicate existing packs

Proposing a New Icon Set

1

Create a discussion

Start a new discussion with:Include:
  • Icon pack name and website
  • License type and link
  • Number of icons
  • Repository URL
  • Use case / why it should be added
  • Example icons or screenshot
2

Get community feedback

Wait for feedback from maintainers and community. They may:
  • Approve the addition
  • Request changes
  • Decline if it doesn’t meet requirements
3

Prepare to implement

Once approved, you can implement the addition yourself or wait for a maintainer to do it.

Implementation Guide

Icon Definition Structure

Icon packs are defined in packages/react-icons/src/icons/index.ts. Here’s the structure:

Adding a Git-Based Icon Pack

1

Choose a prefix

Select a unique 2-4 letter prefix that doesn’t conflict with existing packs:
2

Add the definition

Edit packages/react-icons/src/icons/index.ts and add your pack:
3

Determine the formatter function

The formatter function transforms SVG filenames to React component names:
4

Handle multiple variants (optional)

If the icon pack has variants (solid, outline, etc.), add separate content entries:

Adding an NPM-Based Icon Pack

Some icon packs are distributed via npm:
For npm packages, omit the source field and install the package as a devDependency in package.json.

Fetching and Building

1

Fetch the icons

This clones the repository and copies SVG files to icons/your-pack/.
2

Validate the icons

This verifies:
  • All SVG files are valid
  • No duplicate icon names
  • File paths are correct
3

Build the components

This generates React components in your-prefix/.
4

Test the icons

Create a test component:

Special Configurations

Multi-Color Icons

Some icon packs use multiple colors (e.g., Flat Color Icons). Preserve colors:

SVGO Optimization

Some SVGs need optimization with SVGO:

Dynamic File Selection

For complex directory structures, use a function:

Updating the Documentation

1

Add to README.md

Update the icon library table in README.md:
2

Update icon count

Count the generated icons:
3

Document import pattern

Add an example to the documentation:

Submitting Your Changes

1

Create a pull request

Follow the Contributing guide to submit your changes.
2

Include in PR description

  • Icon pack name and website
  • Number of icons added
  • License information
  • Screenshots of example icons
  • Link to the discussion (if applicable)
3

Wait for review

A maintainer will review your PR and may request changes.

Icon Naming Best Practices

Follow these guidelines for consistent icon naming:
  • Use PascalCase: XxArrowLeft not xxarrowleft
  • Include prefix: XxHome not Home
  • Be descriptive: XxArrowLeft not XxAl
  • Group variants: XxOutlineHome, XxSolidHome
  • Avoid special characters: Replace with camelCase

Common Issues

Verify the file path in your icon definition:
Run ls icons/your-pack/svg/*.svg to verify files exist.
Icon names must be unique within a pack. Check for:
  • Files with the same name in different directories
  • Formatter generating the same name for different files
Use variant prefixes to differentiate:
Try enabling SVGO processing:
Or for multi-color icons, disable it:
Increase Node.js heap size:

Examples from Existing Packs

Learn from existing icon packs in src/icons/index.ts:

Next Steps

Contributing

Learn how to submit your changes

Building from Source

Build and test your icon pack