Getting started
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| size | number | string | 24 | Width and height |
| color | string | "currentColor" | Stroke color |
| strokeWidth | number | string | 1 | Stroke width |
| absoluteStrokeWidth | boolean | false | Keep the stroke width the same at any size |
| fill | string | "none" | Fill color |
| className | string | — | Extra classes, added after krz-icon |
| style | CSSProperties | — | Inline styles |
| title | string | — | Accessible label (sets role="img" instead of hiding the icon from screen readers) |
All other SVG props (className, style, onClick, ref, …) are passed through to the <svg> element. Every icon has the krz-icon class.