Switch

Toggle switch with animated thumb and label.

Installation

Installs the Base UI flavor. Switch in the right panel.

Basic

Inspect
Notifications

Disabled

Inspect
Disabled option

API Reference

PropTypeDefaultDescription
labelstring—Text label displayed next to the switch.
checkedboolean—Whether the switch is on.
onToggle() => void—Called when the switch is toggled.
disabledbooleanfalseDisables the switch.