{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "switch", "type": "registry:ui", "dependencies": ["@ark-ui/react"], "files": [ { "path": "./src/components/ui/switch.tsx", "content": "\"use client\"\n\nimport * as React from \"react\"\n\nimport { Switch as SwitchPrimitive } from \"@ark-ui/react/switch\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Switch = React.forwardRef<\n React.ElementRef,\n SwitchPrimitive.RootProps\n>(({ className, children, ...props }, ref) => (\n \n {children}\n \n))\nSwitch.displayName = \"Switch\"\n\nconst SwitchContext = SwitchPrimitive.Context\n\nconst SwitchControl = React.forwardRef<\n React.ElementRef,\n SwitchPrimitive.ControlProps\n>(({ className, children, ...props }, ref) => (\n \n {children}\n \n \n))\nSwitchControl.displayName = \"SwitchControl\"\n\nconst SwitchLabel = React.forwardRef<\n React.ElementRef,\n SwitchPrimitive.LabelProps\n>(({ className, ...props }, ref) => (\n \n))\nSwitchLabel.displayName = \"SwitchLabel\"\n\nconst SwitchRootProvider = SwitchPrimitive.RootProvider\n\nconst SwitchThumb = React.forwardRef<\n React.ElementRef,\n SwitchPrimitive.ThumbProps\n>(({ className, ...props }, ref) => (\n \n))\nSwitchThumb.displayName = \"SwitchThumb\"\n\nexport {\n Switch,\n SwitchContext,\n SwitchControl,\n SwitchLabel,\n SwitchRootProvider,\n SwitchThumb,\n}\n\nexport {\n useSwitch,\n useSwitchContext,\n type SwitchCheckedChangeDetails,\n} from \"@ark-ui/react/switch\"\n", "type": "registry:ui" } ] }