{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "collapsible",
  "type": "registry:ui",
  "title": "Collapsible",
  "description": "Single show/hide region with animated open/close. The building block under accordions and disclosures.",
  "dependencies": [
    "@radix-ui/react-collapsible",
    "@saasflare/ui"
  ],
  "files": [
    {
      "path": "components/ui/collapsible.tsx",
      "type": "registry:ui",
      "content": "// @toreview\n\"use client\"\n\n/**\n * @fileoverview Collapsible primitive — expandable/collapsible content region with trigger control.\n * Built on Radix UI Collapsible. Part of the Saasflare base component layer.\n * @module packages/ui/components/ui/collapsible\n * @layer core\n *\n * @component\n * @example\n * import { Collapsible, CollapsibleTrigger, CollapsibleContent } from '@saasflare/ui';\n * <Collapsible>\n *   <CollapsibleTrigger>Toggle</CollapsibleTrigger>\n *   <CollapsibleContent>Hidden content revealed on toggle.</CollapsibleContent>\n * </Collapsible>\n */\n\nimport * as React from \"react\"\nimport * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\"\nimport { useSaasflareProps, type SaasflareComponentProps } from \"@saasflare/ui\"\n\n/**\n * Props for {@link CollapsibleContent}. Extends the Radix Collapsible content\n * props with the Saasflare theming axes (`surface`, `radius`, `animated`,\n * `iconWeight`).\n */\ninterface CollapsibleContentProps\n  extends Omit<React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>, keyof SaasflareComponentProps>,\n    SaasflareComponentProps {}\n\n/**\n * Expandable content region toggled by a trigger. Root of the composition —\n * owns open state and wires {@link CollapsibleTrigger} and\n * {@link CollapsibleContent} together. Use for a single show/hide section;\n * for stacked exclusive sections reach for Accordion.\n *\n * @component\n * @layer core\n */\nfunction Collapsible({\n  ...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {\n  return <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />\n}\n\n/**\n * Button that toggles the collapsible region open and closed.\n *\n * @component\n * @layer core\n */\nfunction CollapsibleTrigger({\n  ...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {\n  return (\n    <CollapsiblePrimitive.CollapsibleTrigger\n      data-slot=\"collapsible-trigger\"\n      {...props}\n    />\n  )\n}\n\n/**\n * The content region revealed while the collapsible is open. Resolves\n * `surface`/`radius`/`animated` against the <SaasflareProvider> context and\n * exposes them as data attributes for CSS-driven styling.\n *\n * @component\n * @layer core\n */\nfunction CollapsibleContent({\n  surface,\n  radius,\n  animated,\n  iconWeight,\n  ...props\n}: CollapsibleContentProps) {\n  const sf = useSaasflareProps({ surface, radius, animated, iconWeight })\n\n  return (\n    <CollapsiblePrimitive.CollapsibleContent\n      {...props}\n      data-slot=\"collapsible-content\"\n      data-surface={sf.surface}\n      data-radius={sf.radius}\n      data-animated={String(sf.animated)}\n    />\n  )\n}\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent, type CollapsibleContentProps }\n",
      "target": "components/ui/collapsible.tsx"
    }
  ],
  "$meta": {
    "source": "https://ui.saasflare.io/r/collapsible.json"
  }
}
