Contributing to React Icons
React Icons is an open-source project, and we welcome contributions from the community. Whether you’re fixing bugs, adding features, or updating icon packs, your help is appreciated.Ways to Contribute
Report Issues
Found a bug or have a feature request? Open an issue on GitHub
Add Icon Sets
Propose new icon libraries to include in React Icons
Update Icons
Help keep existing icon packs up to date
Improve Docs
Fix typos or add examples to the documentation
Getting Started
1
Fork the repository
Fork the react-icons/react-icons repository to your GitHub account.
2
Clone your fork
3
Install dependencies
React Icons uses Yarn for package management:
4
Create a branch
Create a new branch for your changes:
Development Workflow
Building from Source
1
Navigate to the package
2
Fetch icon sources
Download the latest icon sources from upstream repositories:
3
Build the package
Generate the React components from SVG files:
4
Run the demo
Test your changes in a demo app:
Project Structure
Adding a New Icon Set
1
Check license compatibility
Ensure the icon pack has a compatible open-source license:
- MIT
- Apache 2.0
- CC BY 4.0
- ISC
- OFL
2
Add to icon definitions
Edit
packages/react-icons/src/icons/index.ts and add your icon pack:3
Fetch and build
Run the fetch and build process:
4
Test the icons
Verify your icons work correctly:Test importing and rendering icons from your new pack.
5
Update documentation
Add your icon pack to the README.md icon table with:
- Pack name and link
- License
- Version
- Icon count
Updating an Existing Icon Set
1
Update the hash
Find the icon pack in
packages/react-icons/src/icons/index.ts and update the hash to the latest commit:2
Fetch and rebuild
3
Update version info
Update the version and icon count in README.md if they changed.
Code Style
- TypeScript
- Formatting
- Linting
Testing Your Changes
Manual Testing
1
Test in demo app
2
Test tree-shaking
Build the demo and check the bundle size:Verify that only used icons are included in the bundle.
3
Test TypeScript
If you changed types, verify TypeScript compilation:
Submitting a Pull Request
1
Commit your changes
Write clear, descriptive commit messages:Follow conventional commits format:
feat:for new featuresfix:for bug fixesdocs:for documentationchore:for maintenance
2
Push to your fork
3
Create the pull request
Go to the React Icons repository and create a pull request from your branch.Include in your PR description:
- What changes you made
- Why you made them
- How to test them
- Screenshots (if applicable)
4
Wait for review
A maintainer will review your PR. Be patient and respond to feedback promptly.
Build Scripts
The project uses several build scripts:Full Project Build
To build the entire project:Getting Help
GitHub Discussions
Ask questions and share ideas
GitHub Issues
Report bugs and request features
Code of Conduct
Please be respectful and constructive in all interactions. We want to maintain a welcoming community for all contributors.By contributing to React Icons, you agree that your contributions will be licensed under the MIT License.
Next Steps
Building from Source
Detailed build instructions
Adding Icon Sets
Complete guide to adding new icon packs