Switch

PreviousNext

A control that allows users to toggle between checked and unchecked states.

Component switch-basic not found in registry.

Component switch-states not found in registry.

Component switch-settings not found in registry.

Usage

import { Switch } from "@/registry/react-aria/ui/switch"
 
export default function SwitchExample() {
  return (
    <Switch>
      <span>Toggle me</span>
    </Switch>
  )
}

Examples

Basic Switch

A simple switch component that toggles between on and off states automatically.