{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "accordion",
  "title": "Accordion",
  "description": "Stacked sections that open and close under their headings, one or several at a time, with a height animation.",
  "dependencies": [
    "@radix-ui/react-accordion",
    "lucide-react"
  ],
  "registryDependencies": [
    "@corsair-ui/utils"
  ],
  "files": [
    {
      "path": "registry/default/ui/accordion.tsx",
      "content": "\"use client\";\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\";\nimport { ChevronDownIcon } from \"lucide-react\";\nimport type { ComponentProps } from \"react\";\nimport { cn } from \"@/registry/default/lib/utils\";\n/**\n * A stack of sections that open and close under their headings: FAQs,\n * settings groups, long forms. `type=\"single\"` keeps one section open at a\n * time (add `collapsible` to let it close again); `type=\"multiple\"` lets\n * several stay open. Each trigger is a button inside a heading, so Tab\n * reaches it and Enter or Space toggles it; Up and Down move between\n * triggers, Home and End jump to the first and last. Screen readers hear\n * \"expanded\" or \"collapsed\", and the open panel is labelled by its trigger.\n * With reduced motion the panels open without sliding.\n *\n * @example\n * <Accordion type=\"single\" collapsible defaultValue=\"shipping\">\n *   <AccordionItem value=\"shipping\">\n *     <AccordionTrigger>How long does shipping take?</AccordionTrigger>\n *     <AccordionContent>Three to five working days.</AccordionContent>\n *   </AccordionItem>\n *   <AccordionItem value=\"returns\">\n *     <AccordionTrigger>Can I return an order?</AccordionTrigger>\n *     <AccordionContent>Within 30 days of delivery.</AccordionContent>\n *   </AccordionItem>\n * </Accordion>\n */\nfunction Accordion(props: ComponentProps<typeof AccordionPrimitive.Root>) {\n  return <AccordionPrimitive.Root data-slot=\"accordion\" {...props} />;\n}\n/** One section: a trigger and its content. `value` identifies it for `value` / `defaultValue`. */\nfunction AccordionItem({ className, ...props }: ComponentProps<typeof AccordionPrimitive.Item>) {\n  return (\n    <AccordionPrimitive.Item\n      data-slot=\"accordion-item\"\n      className={cn(\"border-b last:border-b-0\", className)}\n      {...props}\n    />\n  );\n}\n/**\n * The button that opens and closes the section. It sits in an `<h3>`, so the\n * sections show up in the page outline; change the level in your copy if the\n * surrounding headings need it.\n */\nfunction AccordionTrigger({\n  className,\n  children,\n  ...props\n}: ComponentProps<typeof AccordionPrimitive.Trigger>) {\n  return (\n    <AccordionPrimitive.Header data-slot=\"accordion-header\" className=\"flex\">\n      <AccordionPrimitive.Trigger\n        data-slot=\"accordion-trigger\"\n        className={cn(\n          \"flex flex-1 cursor-pointer items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium hover:underline\",\n          \"transition-[color,box-shadow] outline-none motion-reduce:transition-none\",\n          \"focus-visible:ring-ring/50 focus-visible:ring-[3px]\",\n          \"disabled:pointer-events-none disabled:opacity-50\",\n          // The chevron flips while the section is open.\n          \"[&[data-state=open]>svg]:rotate-180\",\n          className\n        )}\n        {...props}\n      >\n        {children}\n        <ChevronDownIcon\n          aria-hidden=\"true\"\n          data-slot=\"accordion-icon\"\n          className=\"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 motion-safe:transition-transform\"\n        />\n      </AccordionPrimitive.Trigger>\n    </AccordionPrimitive.Header>\n  );\n}\n/**\n * The panel under a trigger. Its height animates open and closed, unless\n * motion is reduced. `className` goes to the inner box that holds the padding.\n */\nfunction AccordionContent({\n  className,\n  children,\n  ...props\n}: ComponentProps<typeof AccordionPrimitive.Content>) {\n  return (\n    <AccordionPrimitive.Content\n      data-slot=\"accordion-content\"\n      className={cn(\n        \"overflow-hidden text-sm\",\n        // Behind motion-safe: so reduced motion really turns the height animation off.\n        \"motion-safe:data-[state=open]:animate-accordion-open motion-safe:data-[state=closed]:animate-accordion-close\"\n      )}\n      {...props}\n    >\n      <div data-slot=\"accordion-content-inner\" className={cn(\"pt-0 pb-4\", className)}>\n        {children}\n      </div>\n    </AccordionPrimitive.Content>\n  );\n}\nexport { Accordion, AccordionContent, AccordionItem, AccordionTrigger };\n",
      "type": "registry:ui"
    }
  ],
  "tailwind": {
    "config": {
      "theme": {
        "extend": {
          "keyframes": {
            "accordion-open": {
              "from": {
                "height": "0"
              },
              "to": {
                "height": "var(--radix-accordion-content-height)"
              }
            },
            "accordion-close": {
              "from": {
                "height": "var(--radix-accordion-content-height)"
              },
              "to": {
                "height": "0"
              }
            }
          },
          "animation": {
            "accordion-open": "accordion-open 0.2s ease-out",
            "accordion-close": "accordion-close 0.2s ease-out"
          }
        }
      }
    }
  },
  "cssVars": {
    "theme": {
      "animate-accordion-open": "accordion-open 0.2s ease-out",
      "animate-accordion-close": "accordion-close 0.2s ease-out"
    }
  },
  "css": {
    "@keyframes accordion-open": {
      "from": {
        "height": "0"
      },
      "to": {
        "height": "var(--radix-accordion-content-height)"
      }
    },
    "@keyframes accordion-close": {
      "from": {
        "height": "var(--radix-accordion-content-height)"
      },
      "to": {
        "height": "0"
      }
    }
  },
  "type": "registry:ui"
}