Skip to content

Button ​

SCAButton is the base button. It renders a native <button> (or any component through as), an optional left and right icon, a label and an optional dropdown caret. For a square icon-only button use SCAIconButton. Icon names are typed (IconName): see Icons for the full list.

Props ​

PropTypeDefaultDescription
type'default' | 'ghost' | 'bare' | 'toggle''default'Visual weight: filled, outlined, text only, or a toggle that shows selected.
size'xsmall' | 'small' | 'medium' | 'large''medium'xsmall renders like small.
appearance'primary' | 'secondary' | 'inverted' | 'reverseInverted''primary'Colour family. inverted and reverseInverted are for dark backgrounds.
intent'none' | 'success' | 'destructive''none'Semantic colour of the action.
iconLeft / iconRightIconName—Icon before / after the label. With loading, the left icon becomes a loader.
iconSizestringicon default (20px)Size of both icons, e.g. '16px'.
iconMirrorX / iconMirrorYbooleanfalseFlip the left icon.
hasDropdownbooleanfalseShow a caret-down after the label.
loadingbooleanfalseDisable the button and show a loader instead of the left icon (needs iconLeft).
disabledbooleanfalseDisable the button.
selectedbooleanfalseSelected state, e.g. for type="toggle" or an open dropdown trigger.
shadowbooleantrueDrop shadow on the filled button.
tooltip / titlestring—Tooltip text (tooltip wins over title).
gapstring'8px'Space between icon, label and caret.
paddingLeft / paddingRightstring'12px'Horizontal padding.
asstring | Component'button'Root element or component, e.g. RouterLink. A non-button root gets aria-disabled while disabled or loading.

Slots ​

SlotDescription
defaultThe label.
specialContent between the label and the right icon.

The button has no emits: listen to @click on it. Icons follow the button's text colour. The button sets --sca-icon-color on itself, so a value set on a wrapper never reaches them. To recolour the icons, use @include Globals.icon-color(...) on a class passed to the button, or change the button's color (see Icons).

Type ​

Size ​

Icons ​

icon mirror ​

icon size ​

Intent ​

Loading ​

Disabled ​

Icon Button ​

Toggle and selected ​

Tooltip ​

Without shadow ​

Custom root (as) ​