Skip to content

BaseButton

Standard buttons

Props

Prop nameDescriptionTypeValuesDefault
textButton Text

if button text is left empty and slot text is not used (so this is a button only
with an icon) please set at least the prop description or iconTitle for accessibility reasons!
string-''
iconicon displayed
see BaseIcon for available icons
string-null
hideIconset from outside if icon should be made invisibleboolean-false
iconPositionspecify if icon should be displayed left or rightstringtop, right, left'left'
activeset button active (will display a colored border on botton) (row style)
or keep icon colored (single style)
boolean-false
buttonStylespecify a button stylestringsingle, row, secondary, circle'single'
iconColoreddisplay icon with app-colorboolean-false
iconSizespecify icon size
Caveat: this will have no effect on buttonStyle: secondary | circle - icon will always be small
stringsmall, large'small'
iconTitleset a title for the icon that is shown as a tooltip on hoverstring-''
disabledset button inactiveboolean-false
buttonTypeset button typestring-'button'
alignTextdefine alignment of button content
Info: has no effect, if iconPosition 'top' is set
stringcenter, left, right'center'
hasBackgroundColorbackground color is fixed however at least possibility to
display transparent instead
boolean-true
showTooltipshow tooltipboolean-false
descriptionAdd a button description to be used by aria-describedbystring-''
buttonTextWrapset false if button text should not be wrappedboolean-true

Events

Event namePropertiesDescription
clickedundefined Event - the native click eventtriggered on button click

Slots

NameDescriptionBindings
left-of-textcreate custom content (e.g. icon) left of text
texthave your own text element which also allows for easier custom styling.label-id string, number - If you are using this slot please also set the id of your custom element to label-id since this id is used for the <button> aria-labelledby attribute
right-of-textcreate custom content (e.g. icon) right of text

Demo

Button Single Style

Button Row Style

Button Secondary Style

Button Circle Style