{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "collapsible",
  "title": "Collapsible",
  "description": "A region that a trigger button shows and hides, with a height animation.",
  "dependencies": [
    "@radix-ui/react-collapsible"
  ],
  "registryDependencies": [
    "@corsair-ui/utils"
  ],
  "files": [
    {
      "path": "registry/default/ui/collapsible.tsx",
      "content": "\"use client\";\nimport * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\";\nimport type { ComponentProps } from \"react\";\nimport { cn } from \"@/registry/default/lib/utils\";\n/**\n * One region that a button shows and hides: \"show more\" lists, advanced\n * options, a sidebar group. The trigger is a button, so Tab reaches it and\n * Enter or Space toggles it; screen readers hear \"expanded\" or \"collapsed\"\n * and the button points at the region it controls. Controlled with `open` /\n * `onOpenChange` or uncontrolled with `defaultOpen`. With reduced motion the\n * region opens without sliding. For several sections under headings, use\n * Accordion.\n *\n * @example\n * <Collapsible>\n *   <CollapsibleTrigger asChild>\n *     <Button variant=\"ghost\" size=\"sm\">Advanced options</Button>\n *   </CollapsibleTrigger>\n *   <CollapsibleContent>…</CollapsibleContent>\n * </Collapsible>\n */\nfunction Collapsible(props: ComponentProps<typeof CollapsiblePrimitive.Root>) {\n  return <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />;\n}\n/** Toggles the region. Use `asChild` to turn your own button into the trigger. */\nfunction CollapsibleTrigger(props: ComponentProps<typeof CollapsiblePrimitive.Trigger>) {\n  return <CollapsiblePrimitive.Trigger data-slot=\"collapsible-trigger\" {...props} />;\n}\n/** The region that opens and closes. Its height animates, unless motion is reduced. */\nfunction CollapsibleContent({\n  className,\n  ...props\n}: ComponentProps<typeof CollapsiblePrimitive.Content>) {\n  return (\n    <CollapsiblePrimitive.Content\n      data-slot=\"collapsible-content\"\n      className={cn(\n        \"overflow-hidden\",\n        // Behind motion-safe: so reduced motion really turns the height animation off.\n        \"motion-safe:data-[state=open]:animate-collapsible-open motion-safe:data-[state=closed]:animate-collapsible-close\",\n        className\n      )}\n      {...props}\n    />\n  );\n}\nexport { Collapsible, CollapsibleContent, CollapsibleTrigger };\n",
      "type": "registry:ui"
    }
  ],
  "tailwind": {
    "config": {
      "theme": {
        "extend": {
          "keyframes": {
            "collapsible-open": {
              "from": {
                "height": "0"
              },
              "to": {
                "height": "var(--radix-collapsible-content-height)"
              }
            },
            "collapsible-close": {
              "from": {
                "height": "var(--radix-collapsible-content-height)"
              },
              "to": {
                "height": "0"
              }
            }
          },
          "animation": {
            "collapsible-open": "collapsible-open 0.2s ease-out",
            "collapsible-close": "collapsible-close 0.2s ease-out"
          }
        }
      }
    }
  },
  "cssVars": {
    "theme": {
      "animate-collapsible-open": "collapsible-open 0.2s ease-out",
      "animate-collapsible-close": "collapsible-close 0.2s ease-out"
    }
  },
  "css": {
    "@keyframes collapsible-open": {
      "from": {
        "height": "0"
      },
      "to": {
        "height": "var(--radix-collapsible-content-height)"
      }
    },
    "@keyframes collapsible-close": {
      "from": {
        "height": "var(--radix-collapsible-content-height)"
      },
      "to": {
        "height": "0"
      }
    }
  },
  "type": "registry:ui"
}