Icon Button
A button with only an icon.
MarkdownExamples
Basic
API
| Prop | Type | Default |
|---|---|---|
variantStyle hook, exposed as | "primary" | "secondary" | "solid" | "ghost" | "danger" | "link" | "ghost" |
sizeSize hook, exposed as | "small" | "medium" | "large" | — |
fullWidthLayout hook, exposed as | boolean | — |
loadingBusy state: blocks clicks and sets | boolean | — |
disabledDisables the button. A disabled link loses its | boolean | — |
typeNative button type. | "button" | "submit" | "reset" | — |
hrefRenders an | string | — |
toRoute for the router link given to | string | Record<string, unknown> | — |
targetLink target. | "_blank" | "_self" | "_parent" | "_top" | — |
label*Accessible name; icon-only buttons have no visible text to supply one. | string | — |
shapeShape hook, exposed as | "round" | "square" | — |
| Slot | Props |
|---|---|
defaultThe icon. | — |
spinnerShown while | — |
Styling
- Parts
- States
data-button-shapedata-button-icon-only
Accessibility
labelis required: with no visible text, it's the button's only name.