react-icons bundles SVG icons from many libraries as React components. ES6 imports let you include only the icons your app uses.
Overview
react-icons is a package that brings popular icon sets into React applications as SVG components. Instead of shipping one large font file, you import named icons from subpackages such as Material Design, Font Awesome, or Heroicons, which helps keep bundles smaller.
Icons are organized per source library, each with its own import path under react-icons. You can configure default props such as color, size, className, style, and accessibility title through React Context when using a recent enough React version. TypeScript types are supported without a separate types package.
The project exposes dozens of bundled sets on its site, from Ant Design and Bootstrap through Tabler, Lucide, and Simple Icons. A separate all-files package exists for setups such as Meteor or Gatsby where per-icon imports are inconvenient, at the cost of a heavier install.
SVG components are used rather than icon fonts so browsers render vectors directly and only requested glyphs are included in the build.
Key features
- ES6 tree-shakable icon imports
- Many bundled third-party icon sets
- Per-library import paths
- React Context for default icon props
- TypeScript support built in
- Optional all-files package for legacy bundlers
- SVG instead of web fonts
- Accessibility title prop support
Use cases
- Adding icons to React UIs
- Mixing icons from multiple design systems
- Keeping JS bundles smaller than icon fonts
- Building dashboards and marketing sites
- Accessible labeled icons in components