ThemeIcon
Render icon inside element with theme colors
Import
Source
Docs
Package
Usage
Radius
xs
sm
md
lg
xl
Size
xs
sm
md
lg
xl
Color
Color
ThemeIcon supports all colors from theme.colors
,
default color is theme.primaryColor
:
Gradient variant
To use gradient as ThemeIcon background:
- set
variant
togradient
- set
gradient
to{ from: 'color-from', to: 'color-to', deg: 135 }
, wherecolor-from
andcolor-to
are color fromtheme.colors
deg
is linear gradient deg
ThemeIcon component props
Name | Type | Description |
---|---|---|
children * | ReactNode | Icon |
color | MantineColor | Icon color from theme |
gradient | MantineGradient | Controls gradient settings in gradient variant only |
radius | number | "xs" | "sm" | "md" | "lg" | "xl" | Predefined border-radius from theme.radius or number for border-radius in px |
size | number | "xs" | "sm" | "md" | "lg" | "xl" | Predefined width and height or number for width and height in px |
variant | "outline" | "light" | "default" | "filled" | "gradient" | Controls appearance |