IconButton

Actions

Takes a block

Icon-only button. label is its accessible name, never visible text.

IconButton(icon: …, label: …, size: …) { … }

Example

IconButton(icon: "close", label: "Close") IconButton(icon: "edit", label: "Edit the title").primary.sm

Renders with the class wf-icon-btn, stable across releases, so a stylesheet may target it.

Props of IconButton
Prop Type Meaning
icon: String

One of the built-in icon names

label: String

Accessible name (aria-label and title)

size: .sm .md .lg

Its size

tone: .primary .danger

Colour

type: .button .submit .reset

Its role inside a form

disabled: Bool

Whether the control is inert

Attribute families: global, aria, data. Plus the universal props on every element: animate:, exit:, speed:, class:, ref:.