Button
GeneralA versatile button component with multiple variants and sizes.
Preview
Usage
<Button variant="primary">Click me</Button>
<Button variant="outline">Cancel</Button>Props
| Name | Type | Default | Description |
|---|---|---|---|
| variant | 'primary' | 'secondary' | 'outline' | 'ghost' | 'link' | 'primary' | The visual style of the button. |
| size | 'sm' | 'md' | 'lg' | 'icon' | 'md' | The size of the button. |
| disabled | boolean | false | Whether the button is disabled. |
| href | string | undefined | If provided, renders as an anchor tag. |
| type | 'button' | 'submit' | 'reset' | 'button' | The HTML button type. |
Events
| Name | Description |
|---|---|
| click | Fired when the button is clicked. |
Slots
| Name | Description |
|---|---|
| default | The content of the button. |