kt-icon
A Lucide icon, resolved from the registry by name.
Preview
A Lucide icon, resolved from the registry by name.
Default 24px, stroke width 2, drawn in currentColor — the icon takes the
colour of the text around it, with no attribute to keep in sync.
Registering icons
Kanto ships the 24 icons its own elements draw and nine a first screen reaches
for — plus, pencil, settings, download, upload, external-link,
filter, ellipsis, refresh-cw. Register whatever else the application
uses, once, at start-up:
Names normalise to kebab-case, so Rocket, rocket and ROCKET all resolve
to rocket.
Prototyping and can afford the weight? Register the lot:
Accessibility
By default the icon is aria-hidden — correct for the common case, where it
sits next to text that already names the action.
Give it a label only when it carries meaning alone, which makes it
role="img" with that accessible name:
API
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
name | name | string | '' | Registered icon name, kebab-case. |
size | size | number | 24 | Width and height, in pixels. |
strokeWidth | stroke-width | number | 2 | SVG stroke width. |
label | label | string | '' | Accessible name. Empty = hidden. |
| Part | Description |
|---|---|
svg | The <svg> root |
An unknown name renders an empty box of the right size and warns once in the console — a typo shifts no layout while you find it.