{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "accordion",
  "type": "registry:ui",
  "title": "Accordion",
  "description": "Sections that open in place: row headers with a chevron; the panel grows to its content on the settle spring while the chevron turns on the part spring, and leaves on release.",
  "dependencies": [
    "@base-ui/react@^1.8.0"
  ],
  "registryDependencies": [
    "https://metalui.dev/r/tokens.json"
  ],
  "files": [
    {
      "path": "packages/metalui/src/components/accordion/accordion.tsx",
      "type": "registry:ui",
      "target": "components/metalui/accordion/accordion.tsx",
      "content": "'use client';\n\nimport * as React from 'react';\nimport { Accordion as BaseAccordion } from '@base-ui/react/accordion';\n\n/* ─────────────────────────────────────────────────────────\n * ACCORDION, sections that open in place, on Base UI Accordion\n *\n *   rest      a row per section (the row's panel hover), a chevron at the end, engraved rules between\n *   open      the panel grows to its content on the settle spring (no overshoot) as the content\n *             fades in; the chevron turns a quarter on the part spring (it may overshoot its stop)\n *   close     height and content leave on the release spring; the chevron turns back\n *   focus     the green ring on the header; Tab moves between headers, Enter or Space opens\n *   disabled  40 %\n * Reduce Motion: the height snaps, the content crossfades, the chevron snaps.\n * Slots: Accordion.Root, Accordion.Item, Accordion.Trigger, Accordion.Panel.\n * ───────────────────────────────────────────────────────── */\n\nconst ROOT = 'mu-accordion grid';\nconst ITEM = 'mu-accordion-item relative [&+&]:before:absolute [&+&]:before:inset-x-accordion-trigger-pad-x [&+&]:before:top-0 [&+&]:before:h-px [&+&]:before:recipe-rule';\nconst HEADER = 'mu-accordion-header m-0';\nconst TRIGGER = 'mu-accordion-trigger group/acc flex w-full items-center gap-accordion-trigger-gap h-accordion-trigger-height px-accordion-trigger-pad-x rounded-accordion-trigger-radius border-0 bg-transparent type-ui text-ink text-left cursor-pointer outline-none transition-row hover:recipe-row-panel-hover focus-visible:focus-ring data-disabled:opacity-accordion-trigger-disabled data-disabled:cursor-default';\nconst CHEVRON = 'mu-accordion-chevron ml-auto flex-none size-accordion-chevron-size text-ink2 accordion-chevron reduced-motion:transition-none';\nconst PANEL = 'mu-accordion-panel accordion-panel';\nconst BODY = 'mu-accordion-body px-accordion-panel-pad-x pb-accordion-panel-pad-bottom type-body text-ink2';\n\nfunction Root({ className, ...props }: BaseAccordion.Root.Props & { className?: string }) {\n  return <BaseAccordion.Root className={className ? `${ROOT} ${className}` : ROOT} {...props} />;\n}\n\nfunction Item({ className, ...props }: BaseAccordion.Item.Props & { className?: string }) {\n  return <BaseAccordion.Item className={className ? `${ITEM} ${className}` : ITEM} {...props} />;\n}\n\n/** The section's header row; its children are the title. */\nfunction Trigger({ className, children, ...props }: BaseAccordion.Trigger.Props & { className?: string }) {\n  return (\n    <BaseAccordion.Header className={HEADER}>\n      <BaseAccordion.Trigger className={className ? `${TRIGGER} ${className}` : TRIGGER} {...props}>\n        {children}\n        <svg aria-hidden viewBox=\"0 0 12 12\" className={CHEVRON} fill=\"none\" stroke=\"currentColor\" strokeWidth={1.5} strokeLinecap=\"round\" strokeLinejoin=\"round\">\n          <path d=\"M4.5 2.5 8 6l-3.5 3.5\" />\n        </svg>\n      </BaseAccordion.Trigger>\n    </BaseAccordion.Header>\n  );\n}\n\n/** The section's content, revealed by the panel. */\nfunction Panel({ className, children, ...props }: BaseAccordion.Panel.Props & { className?: string }) {\n  return (\n    <BaseAccordion.Panel className={PANEL} {...props}>\n      <div className={className ? `${BODY} ${className}` : BODY}>{children}</div>\n    </BaseAccordion.Panel>\n  );\n}\n\nexport const Accordion = Object.assign(Root, { Item, Trigger, Panel, Root });\n"
    }
  ],
  "docs": "Agent guide: https://metalui.dev/r/accordion.md. SwiftUI: MetalAccordion in the MetalUI Swift package."
}
