BaiyueSpace

GitHub
Switch
A toggle switch for turning things on and off.

Installation

Usage

Props

PropertyTypeDefaultDescription
checkedbooleanControlled checked state.
defaultCheckedbooleanfalseInitial checked state when uncontrolled.
onCheckedChange(checked: boolean) => voidCallback when checked state changes.
activeColorstring"#4CD964"Background color when checked.
disabledbooleanfalseWhether the switch is disabled.

Examples

Checked

Custom Active Color

Disabled

© 2026 BaiyueSpace