Button
To trigger an operation.
Examples
API
To get a customized button, just set type
/shape
/size
/loading
/disabled
.
Attributes
Property | Description | Type | Default |
---|---|---|---|
disabled | The disabled state of button | Boolean | false |
class | The class attribute | String | Object | - |
style | The style attribute | String | Object | - |
ghost | Makes the background transparent and inverts the text and border colors | Boolean | false |
href | The url of link button | String | - |
htmlType | Set the original html type of button | String | button |
icon | Set the icon component of button | SvelteComponent | - |
loading | Set the loading status of button | Boolean | { delay: Number } | false |
shape | Can be set to circle, round or omitted | Boolean | { delay: Number } | false |
size | Set the size of button | large | default | small | - |
target | Same as target attribute of <a>, works when href is specified | String | - |
type | Can be set to primary, ghost, dashed, link or omitted (meaning default) | String | default |
block | Option to fit button width to its parent width | Boolean | false |
danger | Set the danger status of button | Boolean | false |
Events
Name | Description |
---|---|
click | Specify a function that will be called when a user clicks the button. |