Skip to main content
React Icons provides a consistent import pattern across 30+ icon packs, making it easy to use icons from different libraries in your React application.

Basic Import Pattern

React Icons uses ES6 named imports with a clear, predictable pattern:
Where:
  • IconName is the specific icon component (e.g., FaBeer, MdHome, AiFillStar)
  • pack is the two-letter abbreviation for the icon pack (e.g., fa, md, ai)

Import Examples by Pack

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:
This approach is not recommended for most projects. It has slower installation times and is only necessary for specific build systems like Meteor or Gatsby with older configurations.

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: Fa prefix from react-icons/fa6

Material Design

  • All icons: MdIconName (e.g., MdHome, MdSettings)
  • Outlined/Filled variants use different names (e.g., MdFavorite vs MdFavoriteBorder)

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:
  1. Browse the official catalog: Visit react-icons.github.io/react-icons
  2. Search by keyword: Use the search function to find icons by name
  3. Filter by pack: Select specific icon packs to browse
  4. 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