Icons libraries with Mantine
You can use any icons library with Mantine components, most popular options are:
Tabler icons
Tabler icons are used in Mantine demos, documentation
and some @mantine/ packages depend on them. If you do not know which icons library
to use, we recommend Tabler icons.
Icons size
Most of the icons libraries support size prop (or similar width and height props) which allows changing
icon width and height. Usually, it is a number in pixels.
rem units in size prop
Icons
sizeprop is usually converted towidthandheightprops under the hood. If you setsize={16}it will be converted towidth="16"andheight="16"attributes on svg element.You can use rem units in
sizeprop:size="1rem"will be converted towidth="1rem"andheight="1rem", but it is not recommended as it is prohibited by SVG standard – some browsers (Firefox) will show a warning in the console.
Custom icons
It is recommended to use icons as React components. In this case, you will be able to use
currentColor in the fill and stroke prop. This will change icon color based on the context
it is used in.