Skip to content
Binary Dreams UI Kit reference Switch

Switch

Bindable binary switch with visible or aria-only labeling.

Loading interactive example

Use Switch for a setting that takes effect as soon as it changes. The thumb keeps the same inset in both states. The thumb moves on the base motion step. Reduced motion changes its position immediately.

API

MemberTypeKindRequiredDefault
ariaLabelstringpropNoundefined
checkedbooleanbindingNofalse
disabledbooleanpropNofalse
labelstringpropNoundefined
onCheckedChange(checked: boolean) => voidcallbackNoundefined
sizeControlSizepropNo'md'

Examples

Source

Loading source