Component
IconButton
A square button for a single glyph, named by its `label`.
import { IconButton } from '@loidolt/theme-svelte';
Example
Notes
labelbecomes the accessible name. An icon button without one is an unnamed control.- The icon itself is yours: the system ships no icon set and imposes no icon library.
Props
Generated from the component source, so it cannot drift from the implementation.
| Prop | Type | Default | Notes |
|---|---|---|---|
children required | Snippet | — | |
label required | string | — | Accessible name for the icon-only control. Required — there is no visible text. |
class | string | — | |
disabled | boolean | false | |
ref bindable | HTMLButtonElement | null | null | |
size | ControlSize | 'md' | |
variant | ActionVariant | 'ghost' |
Plus the attributes of HTMLButtonAttributes, forwarded to the root element.