1 | |
An icon-only action — link or button — in four variants, three sizes, and a square or circle shape.
| Prop | Type | Default |
|---|---|---|
icon
Caller-selected Central icon name. Add the exact glyph in the consumer with `node script/icons-central.mjs add <name>`, then pass that name here. IconButton does not own a fixed icon fixture.
|
String | required |
label
Accessible name → `aria-label` (not shown). Required — an icon alone is not announced by assistive tech.
|
String | required |
href
When present, renders an <a>; otherwise a <button>.
|
String | nil |
variant
One of VARIANTS: primary, secondary, muted, ghost.
|
String | "primary" |
size
One of SIZES: xs (28×28, default), sm (32×32), md (36×36).
|
String | "xs" |
shape
One of SHAPES: square (8px radius) · circle (round).
|
String | "square" |
disabled
Disables the element (button attr / aria-disabled on links).
|
Boolean | false |
type
Button type attribute: "button", "submit", or "reset".
|
String | "button" |
**html_options
Any extra HTML attributes (data-*, aria-*, …).
|
Hash | — |