Button
Overview
Buttons are used to initialize an action. Button labels express what action will occur when the user interacts with it.
Primary: For the primary, most important, or most common action on a screen.
Secondary: For optional or supplementary actions with less prominence.
Demo
Props
| Property | Description | Type | Values | Default | Required |
|---|---|---|---|---|---|
| label | The text for the button | string | undefined | string | undefined | ||
| size | The button's size | ButtonSize | undefined | "small" | "medium" | "large" | "medium" | |
| variant | Whether this is a primary or secondary button | ButtonVariant | undefined | "primary" | "secondary" | "primary" | |
| format | Dictates if the button has an icon | ButtonFormat | undefined | "no-icon" | "with-icon" | "icon-only" | "no-icon" | |
| to | Turns the button into an anchor and sets the href | string | undefined | string | undefined |
Slots
| Name | Description | Type |
|---|---|---|
| default | The content in the button. | any |
| icon | The icon for the button. If left empty defaults to a right arrow. | any |