Button

A button component that supports various styles, sizes, and states. It can be used as a standard button or as a link.

Props

NameDefaultType
loadingfalseboolean
Shows a loading spinner and disables the button
size'm's m l
Controls the size of the button
expandfalseboolean
Makes the button expand to full width
squarefalseboolean
Makes the button square instead of rectangular
variant'gray'fill danger success link accent gray
Controls the button's appearance
outlinefalseboolean
Makes the button outlined instead of filled
disabledfalseboolean
Disables the button
plainfalseboolean
Removes background and border, keeping only the text
hrefstring
URL to navigate to. When provided, renders as an anchor (a) element

Slots

NameAcceptsDescription
defaultanyThe main content of the button
startanyContent to be displayed before the main content
endanyContent to be displayed after the main content

Events

The button component emits all standard button events like click, focus, blur, etc.

Examples

Custom slots