Skip to content
On this page

button

button styles

button sizes

tooltip

icon

loading

error

template

html
<bunt-button id="btn-none">default</bunt-button>
<bunt-button id="btn-primary">color</bunt-button>
<bunt-button id="btn-clear">clear</bunt-button>
<bunt-button id="btn-text-color">text color</bunt-button>
<bunt-button id="btn-disabled" :disabled="true">disabled</bunt-button>

<bunt-button id="btn-none">normal</bunt-button>
<bunt-button id="btn-large">large</bunt-button>
<bunt-button id="btn-huge">huge</bunt-button>

<bunt-button id="btn-tooltip" tooltip="hoorrraaaa">tooltip</bunt-button>
<bunt-button id="btn-tooltip" tooltip="hoorrraaaa" tooltip-placement="right">tooltip right</bunt-button>

<bunt-button id="btn-icon" icon="add">icon</bunt-button>

<bunt-button id="btn-loading" :loading="true">a longish text</bunt-button>

<bunt-button id="btn-error" :error="true">a longish text</bunt-button>
<bunt-button id="btn-error" error-message="something went wrong">a longish text</bunt-button>

style

stylus
#btn-none, #btn-tooltip, #btn-icon
	button-style()
#btn-primary, #btn-disabled, #btn-loading, #btn-error
	button-style(color: $clr-primary)
#btn-clear
	button-style(color: $clr-primary, style: 'clear')
#btn-text-color
	button-style(color: $clr-danger, text-color: $clr-warning)
#btn-large
	button-style(size: 'large')
#btn-huge
	button-style(size: 'huge')

props

proptyperequireddefaultdescription
typestringfalse'button'native button type
disabledbooleanfalsefalsedisables button (renders as disabled and does not emit click, other events and native events are unaffected)
iconstringfalsemdi icon name to display
tooltipstringfalsetooltip text
tooltip-placementstringfalse'bottom'tooltip placement, see v-tooltip directive documentation
tooltip-fixedbooleanfalsefalseposition tooltip fixed, see v-tooltip directive documentation
loadingbooleanfalsefalseshow loading indicator and disable button
errorbooleanfalsefalserender the button error state
errorMessagestringfalserender the button error state and show a message as open tooltip
textstringfalsebutton text (recommended: use slot instead)

slots

slotdescription
defaultbutton text

events

eventargsdescription
clicknull

style mixin parameters

parametertypedefaultdescription
style'flat', 'clear''flat'button style
colorcolorbackground-color if flat style, text color if clear style
text-colorcolorautomagictext-color is automatically chosen depending on lightness of color
size'normal', 'large', 'huge''normal'button size

Released under the MIT License.