UI Componentsprimitives
Switch
Radix-based toggle switch component.
Preview placeholder
switch
Installation
Terminal
npx @ontopic/viz add ui/generic/switchProps
| Prop | Type | Description |
|---|---|---|
checked | boolean | Controlled checked state |
onCheckedChange | function | Change handler |
See full TypeScript interface on GitHub for all props.
Usage Example
TypeScript
import { Switch } from '@/viz/ui/generic/switch';Metadata
- Last Updated2025-01-12
- FrameworkUI Components
- Categoryprimitives
- Subcategorygeneric
UI Radix Toggle Form
Dependencies
@radix-ui/react-switch
Quick Install
npx @ontopic/viz add ui/generic/switch