{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "toggle",
  "title": "Toggle",
  "description": "Pressable toggle button.",
  "dependencies": [
    "@radix-ui/react-toggle"
  ],
  "files": [
    {
      "path": "registry/new-york/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 * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst toggleVariants = cva(\n  \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium text-sm outline-none transition-[color,box-shadow] hover:bg-muted hover:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n  {\n    variants: {\n      variant: {\n        default: \"bg-transparent\",\n        outline:\n          \"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground\",\n      },\n      size: {\n        default: \"h-9 min-w-9 px-2\",\n        sm: \"h-8 min-w-8 px-1.5\",\n        lg: \"h-10 min-w-10 px-2.5\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n      size: \"default\",\n    },\n  }\n);\n\nfunction Toggle({\n  className,\n  variant,\n  size,\n  ...props\n}: React.ComponentProps<typeof TogglePrimitive.Root> &\n  VariantProps<typeof toggleVariants>) {\n  return (\n    <TogglePrimitive.Root\n      aria-disabled={(props as any).disabled ? true : undefined}\n      className={cn(\n        toggleVariants({ variant, size }),\n        \"touch-manipulation\",\n        className\n      )}\n      data-slot=\"toggle\"\n      type=\"button\"\n      {...props}\n    />\n  );\n}\n\nexport { Toggle, toggleVariants };\n",
      "type": "registry:ui"
    }
  ],
  "meta": {
    "apiRef": "https://www.radix-ui.com/docs/primitives/components/toggle#api-reference"
  },
  "docs": "https://www.radix-ui.com/primitives/docs/components/toggle",
  "categories": [
    "component"
  ],
  "type": "registry:ui"
}