Basic Import Pattern
React Icons uses ES6 named imports with a clear, predictable pattern:IconNameis the specific icon component (e.g.,FaBeer,MdHome,AiFillStar)packis the two-letter abbreviation for the icon pack (e.g.,fa,md,ai)
Import Examples by Pack
- Font Awesome
- Material Design
- Ant Design
- Heroicons
Available Icon Packs
React Icons includes 40,000+ icons from 30+ popular icon packs. Here are the most commonly used:View the complete icon catalog at react-icons.github.io/react-icons to search and browse all available icons.
Multiple Imports
You can import multiple icons from the same pack in a single statement:Mixing Icon Packs
You can use icons from different packs in the same component:Import from Specific Files (Alternative)
For projects with specific build requirements, you can import from individual icon files using the@react-icons/all-files package:
Icon Naming Conventions
Icon names follow predictable patterns based on their source library:Font Awesome
- Solid icons:
FaIconName(e.g.,FaUser,FaHome) - Regular/Outline: Often same name or with suffix
- Font Awesome 6:
Faprefix fromreact-icons/fa6
Material Design
- All icons:
MdIconName(e.g.,MdHome,MdSettings) - Outlined/Filled variants use different names (e.g.,
MdFavoritevsMdFavoriteBorder)
Ant Design
- Filled:
AiFillIconName(e.g.,AiFillStar) - Outlined:
AiOutlineIconName(e.g.,AiOutlineStar) - Two-tone:
AiTwotoneIconName
Heroicons v2
- Solid:
HiIconName(e.g.,HiHome) - Outline:
HiOutlineIconName(e.g.,HiOutlineHome) - Mini:
HiMiniIconName
Ionicons 5
- Default:
IoIconName(e.g.,IoHome) - Outline:
IoIconNameOutline(e.g.,IoHomeOutline) - Sharp:
IoIconNameSharp(e.g.,IoHomeSharp)
Finding Icons
To find the exact icon name you need:- Browse the official catalog: Visit react-icons.github.io/react-icons
- Search by keyword: Use the search function to find icons by name
- Filter by pack: Select specific icon packs to browse
- Copy import statement: Click any icon to copy its import statement
Best Practices
Performance Tip: Import only the icons you need. React Icons uses ES6 imports with tree-shaking to ensure only imported icons are included in your bundle.
Organize Imports by Pack
Create Icon Component Wrappers
For consistent styling across your app:Use Semantic Names
TypeScript Support
All icons are fully typed. See the TypeScript guide for detailed type information.Next Steps
Icon Context
Configure default props for all icons
Tree-Shaking
Optimize your bundle size