React icons
70,000+ free icon components for React, each in six weights. Typed for TypeScript, tree-shakeable, and styled with plain props.
Install
npm install @xerobi/icons-react
Use an icon
import { House, Heart } from '@xerobi/icons-react';
export function Nav() {
return (
<>
<House />
<Heart size={32} color="crimson" weight="fill" />
</>
);
}
Set defaults for a whole tree
import { IconContext, House, Bell } from '@xerobi/icons-react';
<IconContext.Provider value={{ size: 24, weight: 'duotone' }}>
<House /> <Bell />
</IconContext.Provider>
Props
| Prop | Values |
|---|---|
size | Number or CSS length, default 1em |
color | Any CSS color, default currentColor |
weight | thin light regular bold fill duotone |
mirrored | Flips the icon for right-to-left layouts |
Any other SVG attribute, such as aria-label or className, passes through to the <svg>. Every icon is also exported with an Icon suffix (HouseIcon) and as a deep import (@xerobi/icons-react/icons/House).
Popular icons
- house
- magnifying-glass
- gear
- user
- bell
- heart
- star
- envelope
- shopping-cart
- calendar
- trash
- plus
- x
- check
- arrow-right
- download
- lock
- camera
Browse all 70,000+ iconsBrowse by category
Frequently asked questions
Does it work with Next.js and server components?
Yes. They render to plain SVG on the server, in static exports and in client components. From version 0.4.3 they also work as React Server Components in the App Router; see the Next.js guide.
Will importing one icon bundle all of them?
No. Each icon is its own ES module, so bundlers such as Vite, webpack and Next.js include only the icons you import.
Is it typed?
Yes. The package ships TypeScript declarations for every component and prop.