{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "toggle",
  "title": "Toggle",
  "description": "A button that stays pressed, in default and outline variants and three sizes.",
  "dependencies": [
    "@radix-ui/react-toggle",
    "class-variance-authority"
  ],
  "registryDependencies": [
    "@corsair-ui/utils"
  ],
  "files": [
    {
      "path": "registry/default/ui/toggle.tsx",
      "content": "\"use client\";\n\nimport * as TogglePrimitive from \"@radix-ui/react-toggle\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport type { ComponentProps } from \"react\";\n\nimport { cn } from \"@/registry/default/lib/utils\";\n\nconst toggleVariants = cva(\n  [\n    \"inline-flex cursor-pointer items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap\",\n    \"transition-[color,background-color,border-color,box-shadow] outline-none motion-reduce:transition-none\",\n    \"hover:bg-muted hover:text-muted-foreground\",\n    \"data-[state=on]:bg-accent data-[state=on]:text-accent-foreground\",\n    \"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]\",\n    \"aria-[invalid=true]:border-destructive aria-[invalid=true]:ring-destructive/20\",\n    \"disabled:pointer-events-none disabled:opacity-50\",\n    \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n  ],\n  {\n    variants: {\n      variant: {\n        default: \"bg-transparent\",\n        outline: \"border-input hover:bg-accent hover:text-accent-foreground border bg-transparent\",\n      },\n      size: {\n        sm: \"h-8 min-w-8 px-1.5\",\n        default: \"h-9 min-w-9 px-2\",\n        lg: \"h-10 min-w-10 px-2.5\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n      size: \"default\",\n    },\n  }\n);\n\n/**\n * A button that stays pressed (`aria-pressed`), e.g. bold in a toolbar. An\n * icon-only toggle needs an `aria-label`.\n */\nfunction Toggle({\n  className,\n  variant,\n  size,\n  ...props\n}: ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>) {\n  return (\n    <TogglePrimitive.Root\n      data-slot=\"toggle\"\n      className={cn(toggleVariants({ variant, size, className }))}\n      {...props}\n    />\n  );\n}\n\nexport { Toggle, toggleVariants };\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}