Select UI framework
Get Started
React Aria
AlertApp Store ButtonAspect RatioBadgeBannerBreadcrumbButton GroupButtonCheckboxCommand MenuCompactButtonDialogDrawerEmptyFancy ButtonFile UploadHintInput OTPInputItemKbdLabelLinkButtonLoaderPopoverProgress BarProgress CircleRadio GroupRatingSelectSeparatorSkeletonSliderSocial ButtonSwitchTagTextareaToggle GroupToggleTooltip
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.