# Collapsible A trigger that shows and hides a region, with its height animated. ```ehtml Example import { Collapsible, CollapsibleTrigger, CollapsibleContent } from "@elements/ui/collapsible"; import { Button } from "@elements/ui/button"; import { Icon } from "@elements/ui/icon";

Order #4189

Status: Shipped

Shipping address and items

``` ## Parts | Part | What it is | |---|---| | `Collapsible` | The root. Owns open; the trigger and content parts can sit anywhere inside it. | | `CollapsibleTrigger` | Wraps the caller's button. Its first element gets aria-expanded, aria-controls and data-state; a click inside toggles. Plain text gets a native button. | | `CollapsibleContent` | The region that shows and hides. Hidden when closed; its height animates. | | `.collapsible-chevron` | Put on an `` in the trigger to turn it with the state (is-right for a chevron-right that turns down). | ## Attributes ### Collapsible | Attribute | Type | Default | Description | |---|---|---|---| | `open` | `boolean` (two-way) | `false` | Whether the content shows. Omit for uncontrolled; bind it to control it. | | `disabled` | `boolean` | `false` | The trigger is disabled and clicks do nothing. | | `onOpenChange` | `(open: boolean, details: DisclosureDetails) => void` | `() => {}` | Called when the trigger toggles it, before the change, with details second (reason, event, trigger, cancel(), isCanceled; reason trigger-press). details.cancel() keeps it as it was. Not called for changes the caller makes. | | `class` | `string` | `""` | Extra classes on the root. | ### CollapsibleContent | Attribute | Type | Default | Description | |---|---|---|---| | `hiddenUntilFound` | `boolean` | `false` | Closed content stays searchable: find in page, or a link to its text, opens it. | | `class` | `string` | `""` | Extra classes on the content. | ## Slots | Slot | Part | Content | |---|---|---| | `default` | `Collapsible` | Any markup, including the trigger and content parts. | | `default` | `CollapsibleTrigger` | The trigger element: a `