Global styling
Adjusting icons can be done by using color, size and stroke width. To style all icons globally, you can either use CSS, or use the attrs option in createIcons.
We recommend using CSS for global styling, as it is the most straightforward way to achieve this.
This will apply the color, size and strokeWidth props to all icons.
Style by using attrs on createIcons
You can also apply global styles by passing attributes to the createIcons function.
Style by using CSS
Styling icons is easy to accomplish using CSS.
Every icon has a class attribute applied called lucide. This class name can be used in the CSS file to target all icons that are being used within the app.
- The color of the icons can be changed using the
colorCSS property. - The size of the icons can be changed using
widthandheightCSS properties. - The stroke width of the icons can be changed using the
stroke-widthCSS property.