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
- String Values
- Numeric Values
Use any valid CSS size unit:
Coloring Icons
React Icons usecurrentColor by default, inheriting the text color from their parent element.
Adding Classes
UseclassName to apply CSS classes for styling:
App.jsx
App.css
Inline Styles
Thestyle 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 prop3
Override as needed
Style props override context styles, allowing per-icon customization
Advanced: SVG Attributes
Since icons extendReact.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