React Icons
Popular icon packs imported as React components with ES6.
3. Used by agents' projects
Dependency in 174 public GitHub projects set up for AI coding agents that we scanned (2.8%).
4. Agent access
Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.
From the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error
What React Icons does
React Icons bundles more than thirty open-source icon sets, from Font Awesome and Material Design to Phosphor and Tabler, into one npm package of React SVG components, and you import each icon by name from that set's own subfolder.
React Icons popularity
Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated
How React Icons is used
- React Icons is a dependency in 174 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (3.6% of the 4,867 JavaScript/TypeScript ones), #11 of 230 in ui components and icons.
- Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 1,079; those are left out of every share on this page.
- The most used alternative in our scan is Lucide React (1,255 projects).
- Projects that use it most often also use React (99.4%), Next.js (69.0%), clsx (70.1%).
By coding agent
Often used with
React Icons in practice
Strengths
Every set sits in its own subfolder under <code>react-icons</code>. To use Material Design instead of Font Awesome, you import from <code>react-icons/md</code>. You do not add a new dependency.
The README argues for SVG over fonts. You send users only the icons you use, not one large font file, and your imports show which icons the project uses.
<code>IconContext.Provider</code> sets <code>color</code>, <code>size</code>, <code>className</code>, <code>style</code>, <code>attr</code> and <code>title</code> for the icons it wraps. <code>size</code> defaults to <code>1em</code>. The README notes this "Requires React 16.3 or higher."
TypeScript support is built in. The README says dependencies on <code>@types/react-icons</code> can be deleted.
Watch out for
The package code is MIT, but the icons come from other projects. The README's table includes sets under CC BY 4.0, CC BY-SA 3.0, CC BY 3.0, MPL-2.0, SIL OFL 1.1 and Apache 2.0, among others. Check the license of each set you ship.
The README warns that the <code>@react-icons/all-files</code> option has not had a new release for some time. It also names a trade-off for this method: "it takes a long time to install the package."
Since version 3, icons no longer get <code>vertical-align: middle</code>. To line them up with text, set it yourself through <code>IconContext</code>, either as an inline style or as a <code>className</code>.
Render a Font Awesome icon
import { FaBeer } from "react-icons/fa";
function Question() {
return (
<h3>
Lets go for a <FaBeer />?
</h3>
);
}More about React Icons
Funding
- GitHub Sponsors: https://github.com/kamijin-fanta
- 1 GitHub sponsors
Head to head
- Lucide React vs React Icons used together in 118 projects
Packages around it
- react: UI library
- framer-motion: animation
- tailwindcss: utility CSS
- next: React framework
- eslint: linter
- @react-three: 3D in React
More in UI components and icons
Alternatives
React Icons This page
Comprehensive icon library with consistent design for React applications.
Get started
Install it.
npm install react-iconsRules for your agent
## React Icons
- Install `react-icons`. Import icons by name from the set's subfolder, for example `import { FaBeer } from "react-icons/fa"`.
- Do not use the old v2 path style `react-icons/lib/fa/beer`. It was replaced in v3.
- Put shared `color`, `size`, `className` or `style` on an `IconContext.Provider` instead of repeating props on every icon. This requires React 16.3 or higher.
- Pass `title` when an icon needs an accessible description.
- When icons sit inline with text, add `verticalAlign: 'middle'` through `IconContext`. Since v3 it is not applied automatically.
- Do not add `@types/react-icons`. Types are built in.
- Check the license of each icon set you use. Some sets are CC BY or CC BY-SA, not MIT.