React Icons
One package, 40,000+ icons — aggregates Font Awesome, Material Design, Heroicons, and 25+ more
STATS
OVERVIEW
React Icons is the Swiss Army knife of icon libraries. Rather than being a standalone icon set, it bundles 25+ of the most popular icon libraries — Font Awesome, Material Design, Heroicons, Bootstrap Icons, Feather, Ionicons, and more — into a single npm package with one unified API.
Every icon set is accessible via a short prefix: fa for Font Awesome, md for Material Design, hi for Heroicons, bs for Bootstrap Icons, fi for Feather, and so on. This means you can mix icons from completely different libraries in the same project without installing multiple packages or learning multiple APIs. With over 40,000 icons across 25+ sets, you will never run out of choices.
React Icons uses ES6 named imports, so each icon is a separate export and tree-shaking works automatically — only the icons you import end up in your bundle. Every icon is a React component that accepts size, color, className, style, and title props. The library ships with TypeScript definitions for all icons across all included sets.
// VERDICTReact Icons is the best choice when you need maximum icon variety, are prototyping quickly, or want to pull icons from multiple design languages without managing separate packages. The trade-off is that the library does not have its own design identity — you are mixing icon sets with different visual styles. For projects requiring strict visual consistency, choose a single focused library like Lucide or Tabler instead.
INSTALLATION
npm install react-icons
npm install react-icons // Note: Works with Next.js App Router and Server Components out of the box. No extra setup required.
// React Icons is React-only. For Vue, use unplugin-icons or install individual icon sets.
// React Icons is React-only. For Svelte, use unplugin-icons instead.
// React Icons requires React. For vanilla JS, use the individual icon library SVG files directly.
CODE EXAMPLES
// Each icon set has a 2-3 letter prefix
import { FaHome, FaGithub } from 'react-icons/fa' // Font Awesome
import { MdSettings, MdSearch } from 'react-icons/md' // Material Design
import { HiUser, HiBell } from 'react-icons/hi' // Heroicons
import { BsTwitter, BsLinkedin } from 'react-icons/bs' // Bootstrap Icons
import { FiCode, FiPackage } from 'react-icons/fi' // Feather Icons
export default function App() {
return (
<div>
<FaHome size={24} />
<MdSettings size={24} color="#6366f1" />
<HiUser size={24} />
</div>
)
}import { FaBell, FaSearch } from 'react-icons/fa'
export default function Navbar() {
return (
<nav className="flex items-center gap-4">
<button className="flex items-center gap-2 text-gray-500 hover:text-gray-900">
<FaSearch className="h-4 w-4" />
<span>Search</span>
</button>
<button className="relative text-gray-500 hover:text-gray-900">
<FaBell className="h-5 w-5" />
<span className="absolute -top-1 -right-1 h-2 w-2 rounded-full bg-red-500" />
</button>
</nav>
)
}// Use IconContext to set default props for all icons in a subtree
import { IconContext } from 'react-icons'
import { FaHome, FaUser, FaCog } from 'react-icons/fa'
export default function Sidebar() {
return (
<IconContext.Provider value={{ size: '20', color: '#6b7280', className: 'flex-shrink-0' }}>
<nav className="flex flex-col gap-2">
<FaHome />
<FaUser />
<FaCog />
</nav>
</IconContext.Provider>
)
}// The killer feature — mix icon sets freely in one project
import { FaReact, FaNodeJs } from 'react-icons/fa' // Font Awesome brands
import { SiTypescript, SiNextdotjs } from 'react-icons/si' // Simple Icons (tech brands)
import { VscGithub } from 'react-icons/vsc' // VS Code Icons
import { TbBrandVercel } from 'react-icons/tb' // Tabler Icons
export function TechStack() {
return (
<div className="flex gap-3">
<FaReact size={24} className="text-cyan-400" />
<SiTypescript size={24} className="text-blue-500" />
<SiNextdotjs size={24} />
<TbBrandVercel size={24} />
</div>
)
}// Complete prefix reference for included icon sets // fa — Font Awesome 5 fa6 — Font Awesome 6 // md — Material Design io — Ionicons 4 // io5 — Ionicons 5 ti — Typicons // go — GitHub Octicons fi — Feather Icons // gi — Game Icons wi — Weather Icons // di — Devicons ai — Ant Design Icons // bs — Bootstrap Icons ri — Remix Icons // fc — Flat Color Icons gr — Grommet Icons // hi — Heroicons hi2 — Heroicons v2 // si — Simple Icons (brands) sl — Simple Line Icons // im — IcoMoon Free bi — BoxIcons // cg — css.gg vsc — VS Code Icons // tb — Tabler Icons rx — Radix Icons // pi — Phosphor Icons lu — Lucide Icons