Skip to content
LoidoltTheme 0.11.1
Svelte 5

Component

IconButton

A square button for a single glyph, named by its `label`.

import { IconButton } from '@loidolt/theme-svelte';

Example

Notes

  • label becomes 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.

IconButton props
PropTypeDefaultNotes
children required Snippet—
label required string—Accessible name for the icon-only control. Required — there is no visible text.
class string—
disabled booleanfalse
ref bindableHTMLButtonElement | nullnull
size ControlSize'md'
variant ActionVariant'ghost'

Plus the attributes of HTMLButtonAttributes, forwarded to the root element.