Toggle switch for on/off settings.
import { Switch } from "@/components/ui";<Switch label="Enable notifications" />Available in multiple sizes
<div className="flex items-center gap-4"> <Switch size="sm" label="Small" /> <Switch size="md" label="Medium" /> <Switch size="lg" label="Large" /></div>Manage switch state
const [enabled, setEnabled] = useState(false);return ( <Switch label="Dark mode" checked={enabled} onChange={(e) => setEnabled(e.target.checked)} />);Add context to the switch
<Switch label="Marketing emails" description="Receive emails about new features and updates"/>Prevent user interaction
<div className="space-y-2"> <Switch label="Disabled off" disabled /> <Switch label="Disabled on" checked disabled /></div>Configure your app with the features you need and download production-ready code.
Start Configuring