{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "switch", "title": "Switch", "description": "A toggle control for boolean states with smooth animation.", "dependencies": [ "@base-ui/react" ], "files": [ { "path": "packages/ui/src/switch.tsx", "content": "\"use client\";\n\nimport { Switch as SwitchPrimitive } from \"@base-ui/react/switch\";\nimport type * as React from \"react\";\nimport { cn } from \"./utils\";\n\nexport interface SwitchProps extends SwitchPrimitive.Root.Props {\n /**\n * Size variant of the switch\n * @default \"default\"\n */\n size?: \"sm\" | \"default\";\n}\n\nexport const Switch = ({\n className,\n size = \"default\",\n ref,\n ...props\n}: SwitchProps & React.RefAttributes) => {\n return (\n \n \n \n );\n};\n\nSwitch.displayName = \"Switch\";\n", "type": "registry:ui" } ], "type": "registry:ui" }