Button
A versatile component that displays as a button or a link, with configurable styles, variants, and sizes.
API Reference
ButtonProps
Extends all the standard HTML attributes of the `<button>` or `<a>` elements.
| Property | Type | Default | Description |
|---|---|---|---|
as | ElementTag | "button" | HTML element to render as. |
ref $bindable | HTMLElement | Reference to the rendered DOM element. The element type is inferred from `as`. | |
color | union | Button color | |
size | union | "2" | Button size |
variant | union | "solid" | Button variant |
radius | union | Button radius | |
transform | union | Text transform | |
align | union | "center" | Text Align |
active | boolean | Button active state | |
disabled | boolean | Button disabled state | |
iconOnly | boolean | Button icon only | |
fullWidth | boolean | Button full width | |
children | Snippet | Button content to render |