Button
A button component that supports various styles, sizes, and states. It can be used as a standard button or as a link.
Props
| Name | Default | Type |
|---|---|---|
loading | false | boolean Shows a loading spinner and disables the button |
size | 'm' | s m l Controls the size of the button |
expand | false | boolean Makes the button expand to full width |
square | false | boolean Makes the button square instead of rectangular |
variant | 'gray' | fill danger success link accent gray Controls the button's appearance |
outline | false | boolean Makes the button outlined instead of filled |
disabled | false | boolean Disables the button |
plain | false | boolean Removes background and border, keeping only the text |
href | — | string URL to navigate to. When provided, renders as an anchor ( a) element |
Slots
| Name | Accepts | Description |
|---|---|---|
default | any | The main content of the button |
start | any | Content to be displayed before the main content |
end | any | Content to be displayed after the main content |
Events
The button component emits all standard button events like click, focus, blur, etc.