The Button component uses HTML's native button element by default.
The label prop is used to populate the text of the button — or alternatively you can use the default slot.
The button can be have different colors, sizes, and states.
The component implements the W3C ARIA APG Button Pattern.
The classic button, in different colors, sizes, and states.
<o-button></o-button>| Prop name | Description | Type | Values | Default |
|---|---|---|---|---|
| disabled | Button will be disabled | boolean | - | false |
| expanded | Button will be expanded (full-width) | boolean | - | false |
| iconLeft | Icon name to show on the left | string | - | |
| iconPack | Icon pack to use | string | mdi, fa, fas and any other custom icon pack |
From config: button: { |
| iconRight | Icon name to show on the right | string | - | |
| inverted | Enable inverted style | boolean | - | false |
| label | Button label, unnecessary when default slot is used | string | - | |
| loading | Enable loading style | boolean | - | false |
| outlined | Enable outlined style | boolean | - | false |
| override | Override existing theme classes completely | boolean | - | |
| rounded | Enable rounded style | boolean | - | From config: button: { |
| size | Size of the control | string | small, medium, large |
From config: button: { |
| tag | Button tag name | DynamicComponent | button, a, input, router-link, nuxt-link (or other nuxt alias) |
From config: button: { |
| type | Button type, like native | "button" | "reset" | "submit" | button, submit, reset |
"button" |
| variant | Color variant of the control | string | primary, info, success, warning, danger, and any other custom color |
From config: button: { |
| Event name | Properties | Description |
|---|---|---|
| click | event Event - native event |
button click event |
| Name | Description | Bindings |
|---|---|---|
| default | Override the label, default is label prop |
Current theme ➜ Oruga
| SASS Variable | Default |
|---|---|
| $button-spacer | h.useVar("control-spacer") |
| $button-height | h.useVar("control-height") |
| $button-padding | h.useVar("control-padding-vertical") h.useVar("control-padding-horizontal") |
| $button-loading-animation-duration | h.useVar("animation-speed-slow") |
| $button-disabled-opacity | h.useVar("control-disabled-opacity") |
| $button-color | h.useVar("font-color") |
| $button-font-size | h.useVar("font-size") |
| $button-font-weight | h.useVar("font-weight") |
| $button-line-height | h.useVar("line-height") |
| $button-box-shadow | none |
| $button-border-width | h.useVar("control-border-width") |
| $button-border-style | solid |
| $button-border-color | h.useVar("control-border-color") |
| $button-border-radius | h.useVar("border-radius") |
| $button-background-color | h.useVar("control-background-color") |
| $button-hover-color | $button-color |
| $button-hover-background-color | $button-background-color |
| $button-hover-border-color | h.useVar("grey-light") |
| $button-outlined-background-color | transparent |
| $button-outlined-border-color | h.useVar("grey-light") |
See ➜ 📄 SCSS file
Current theme ➜ Bulma
The theme does not have any custom variables for this component.