{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "switch", "title": "Switch", "description": "A control that allows the user to toggle between checked and not checked", "dependencies": ["@ark-ui/react", "clsx", "tailwind-merge"], "files": [ { "path": "src/registry/thornberry/components/switch.tsx", "content": "import { Switch as ArkSwitch } from \"@ark-ui/react/switch\";\n\nimport { cn } from \"@/lib/utils\";\n\nimport type { ComponentProps } from \"react\";\n\nconst SwitchProvider = ArkSwitch.RootProvider;\nconst SwitchContext = ArkSwitch.Context;\n\nconst SwitchRoot = ({\n className,\n ...rest\n}: ComponentProps) => (\n \n);\n\nconst SwitchControl = ({\n className,\n ...rest\n}: ComponentProps) => (\n \n);\n\nconst SwitchThumb = ({\n className,\n ...rest\n}: ComponentProps) => (\n \n);\n\nconst SwitchHiddenInput = ({\n className,\n ...rest\n}: ComponentProps) => (\n \n);\n\nconst SwitchLabel = ({\n className,\n ...rest\n}: ComponentProps) => (\n \n);\n\nexport {\n SwitchRoot,\n SwitchControl,\n SwitchThumb,\n SwitchLabel,\n SwitchHiddenInput,\n SwitchProvider,\n SwitchContext,\n};\n", "type": "registry:ui" }, { "path": "src/lib/utils.ts", "content": "import { clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nimport type { ClassValue } from \"clsx\";\n\nexport const cn = (...inputs: ClassValue[]) => {\n return twMerge(clsx(inputs));\n};\n", "type": "registry:lib", "target": "" } ], "type": "registry:ui" }