randomseeds logo
Random Design System

Switch

A toggle control for binary on/off states with immediate effect. Built on Radix UI Switch.

Default

States

Usage

Use switches for settings that take effect immediately (e.g. dark mode, notifications). For form submissions, use a Checkbox instead.

Props

PropTypeDefaultDescription
checkedbooleanControlled checked state
onCheckedChange(checked: boolean) => voidCallback when state changes
disabledbooleanfalseDisables the switch