Skip to main content
React Icons provides flexible customization options through the IconBaseProps interface, allowing you to adjust icons to match your design requirements.

Available Props

Every icon component in React Icons accepts the following props: Additionally, all standard SVG attributes from React.SVGAttributes<SVGElement> are supported.

Sizing Icons

Use any valid CSS size unit:
Using "1em" (default) makes icons scale with the font size of their parent element, ensuring they align perfectly with text.

Coloring Icons

React Icons use currentColor by default, inheriting the text color from their parent element.

Adding Classes

Use className to apply CSS classes for styling:
App.jsx
App.css
When using both IconContext and individual className props, classes are merged with the context class appearing first.

Inline Styles

The style prop accepts any React CSS properties object:
1

Define styles

Create a styles object or use inline styles
2

Apply to icon

Pass the styles via the style prop
3

Override as needed

Style props override context styles, allowing per-icon customization

Advanced: SVG Attributes

Since icons extend React.SVGAttributes<SVGElement>, you can use any SVG attribute:

Combining Multiple Props

All props work together seamlessly:

Next Steps

Styling

Learn about global styling with IconContext

Accessibility

Make your icons accessible to all users