# Collapsible

> Shows and hides one region under its trigger (Radix Collapsible); animates with the accordion tokens.

## Facts

- **Product**: Max
- **Family**: Layout
- **Global**: `window.DigitalCrew.Collapsible`
- **Source**: `max-agent: src/components/ui/collapsible.tsx`
- **Import in the app**: `import { Collapsible } from "@/components/ui/collapsible";`
- **Live preview**: /design/components/collapsible/preview.html
- **Page**: /design/components/collapsible

## Guidelines

**Use it for** optional detail under a summary line ("3 steps skipped for 12 prospects — Show"). Several sections: [**Accordion**](/design/components/accordion.md).

**What you provide**: `open`/`onOpenChange` or `defaultOpen`, a `CollapsibleTrigger` (a ghost small Button whose label says what happens: "Show" / "Hide"), and `CollapsibleContent`.

## API

```ts
declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): JSX.Element;
declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): JSX.Element;
declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): JSX.Element;
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
```

## Example

```html
<div id="root" class="p-6"></div>
<script>
(function () {
  var h = React.createElement, DC = window.DigitalCrew, I = DC.Icons;
function App() {
  var s = React.useState(true);
  return h(DC.Collapsible, { open: s[0], onOpenChange: s[1], className: "max-w-md grid gap-2" },
    h("div", { className: "flex items-center justify-between" },
      h("p", { className: "text-sm font-medium" }, "3 steps skipped for 12 prospects"),
      h(DC.CollapsibleTrigger, { asChild: true }, h(DC.Button, { variant: "ghost", size: "sm" }, s[0] ? "Hide" : "Show"))),
    h(DC.CollapsibleContent, { className: "grid gap-2" },
      h("div", { className: "rounded-md border px-3 py-2 text-sm" }, "8 need a LinkedIn URL"),
      h("div", { className: "rounded-md border px-3 py-2 text-sm" }, "4 have no verified email")));
}
  ReactDOM.createRoot(document.getElementById("root")).render(h(DC.TooltipProvider, { delayDuration: 80 }, h(App)));
})();
</script>
```

## More in Layout

- [Accordion](/design/components/accordion.md): Stacked sections that expand one at a time (or several); height animates in 250ms on the smooth-out ease (`--acc-*`).
- [Card](/design/components/card.md): The raised surface for grouped content: `card` fill, `border`, `radius-xl` (14px), `shadow-sm`, 24px padding and gap.
- [ContentSection](/design/components/content-section.md): The settings-page section: a title, a one-line description, a separator, then a scrolling body.
- [DataTableToolbar](/design/components/data-table-toolbar.md): The toolbar of Max's data-table kit (search, faceted filters, Reset and the View columns menu) and how the kit's pieces fit around a `Table`.
- [Main](/design/components/main.md): The page body of Max's app shell: a `<main>` with the standard page padding and, by default, a centred 7xl width.
- [PanelSplitter](/design/components/panel-splitter.md): The draggable seam between two side-by-side panels; every split view in Max uses it, so one gesture works everywhere.
- [ScrollArea](/design/components/scroll-area.md): A scroll container with thin themed scrollbars (10px track, `border`-coloured thumb) that appear on hover.
- [Separator](/design/components/separator.md): A 1px `border` hairline, horizontal or vertical (Radix Separator, decorative by default).
- [Table](/design/components/table.md): The data table primitive: 14px rows with `border` dividers, 40px header cells in medium weight, `muted` at 50% on hover and selection.
