Skip to content

Button

The classic button, in different colors, sizes, and states

Examples

Base

Show code

States and Styles

Show code

Icons

Show code

Tags

Show code

Class props

'Classes applied to the element'

Button component

The classic button, in different colors, sizes, and states

html
<o-button></o-button>

Props

Prop nameDescriptionTypeValuesDefault
disabledButton will be disabledboolean-false
expandedButton will be expanded (full-width)boolean-false
iconLeftIcon name to show on the leftstring-
iconPackIcon pack to usestringmdi, fa, fas and any other custom icon pack
From config:
button: {
  iconPack: undefined
}
iconRightIcon name to show on the rightstring-
invertedEnable inverted styleboolean-false
labelButton label, unnecessary when default slot is usedstring-
loadingEnable loading styleboolean-false
nativeTypeButton type, like nativestring-"button"
outlinedEnable outlined styleboolean-false
overrideOverride existing theme classes completelyboolean-
roleAccessibility Role attribute to be passed to the button.string-
From config:
button: {
  role: "button"
}
roundedEnable rounded styleboolean-
From config:
button: {
  rounded: false
}
sizeSize of the controlstringsmall, medium, large
From config:
button: {
  size: undefined
}
tagButton tag nameDynamicComponentbutton, a, input, router-link, nuxt-link (or other nuxt alias)
From config:
button: {
  tag: "button"
}
variantColor variant of the controlstringprimary, info, success, warning, danger, and any other custom color
From config:
button: {
  variant: undefined
}

Slots

NameDescriptionBindings
defaultOverride the label, default is label prop

Sass variables

Current theme ➜ Oruga Base

SASS VariableDefault
$button-background-color$primary
$button-color$primary-invert
$button-border-radius$base-border-radius
$button-border1px solid $button-background-color
$button-box-shadownone
$button-font-weight400
$button-line-height$base-line-height
$button-margin-icon-to-text0.1875em
$button-margin0
$button-height$control-height
$button-padding$control-padding-vertical 0.75em
$button-rounded-border-radius$base-rounded-border-radius
$button-disabled-opacity$base-disabled-opacity
$button-outlined-background-colortransparent

See ➜ 📄 Full scss file

Current theme ➜ Oruga Full

SASS VariableDefault
$button-background-color$primary
$button-color$primary-invert
$button-border-radius$base-border-radius
$button-border1px solid $button-background-color
$button-box-shadownone
$button-font-weight400
$button-line-height$base-line-height
$button-margin-icon-to-text0.1875em
$button-margin0
$button-height$control-height
$button-padding$control-padding-vertical 0.75em
$button-rounded-border-radius$base-rounded-border-radius
$button-disabled-opacity$base-disabled-opacity
$button-outlined-background-colortransparent

See ➜ 📄 Full scss file

Current theme ➜ Bulma

The theme does not have any custom variables for this component.

Current theme ➜ Bootstrap

SASS VariableDefault
$btn-spacer0.5rem
$btn-border-colorvar(--#{$prefix}border-color)
$btn-hover-border-colorvar(--#{$prefix}border-color)
$btn-hover-box-shadow$box-shadow-sm

See ➜ 📄 Full scss file

Released under the MIT License.