Switch

Switch is used to quickly change between two states. Often to toggle preferences or settings.

Read more about this component in the Aksel documentation.

Properties

PropertyDescriptionDefault
Control
Properties
checked
bindable

Checked state.

boolean
false
description

Adds a description to extend labeling of Switch.

string
""
disabled

Disables element.

boolean
false
hideLabel

If enabled shows the label and description for screen readers only.

boolean
false
loading

Toggles loading state with loader-component on switch.

boolean
false
position

Positions switch on left/right side of label.

"left" "right"
"left"
size

Changes font-size, padding and gaps.

"medium" "small"
"medium"
Snippets
children

Label for switch.

 -

Properties included from: Omit<HTMLInputAttributes, "size">