Button
A button, or a link styled as one.
MarkdownExamples
Variants
Sizes
Loading
Links
href renders an <a>; to renders your router's link.
API
| Prop | Type | Default |
|---|---|---|
variantStyle hook, exposed as | "primary" | "secondary" | "solid" | "ghost" | "danger" | "link" | — |
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" | — |
| Slot | Props |
|---|---|
defaultLabel. | — |
leadingBefore the label, e.g. an icon. | — |
trailingAfter the label, e.g. an icon. | — |
spinnerShown while | — |
Styling
- Parts
buttonbutton-spinnerbutton-label- States
data-button-variantdata-button-sizedata-button-full-widthdata-button-disableddata-button-loading
Keyboard
| Keys | Action |
|---|---|
Enter / Space | Activate |
Accessibility
- While
loading, clicks are ignored but the button keeps focus. - Disabled links lose their
hrefand leave the tab order.