# Collapsible

A named disclosure button and retained show/hide panel.

Connect Flood once using [the installation guide](https://flood.md/docs/installation). Then import the components you use; no per-component add command is needed.

## Example

```tsx
"use client";

import { FloodRoot, Collapsible } from "@flood-md/react";
import "@flood-md/react/styles.css";

export function Example() {
  return (
    <FloodRoot>
      <Collapsible title="Advanced settings">Additional project settings.</Collapsible>
    </FloodRoot>
  );
}
```

## Design notes

- Use open/onOpenChange or defaultOpen. The panel stays mounted and hidden when closed; hidden form controls keep native form semantics.
- Title is plain text for a stable button name. Content may be interactive. Disabled prevents trigger activation, not interaction inside an open panel.

## API reference

| Prop | Values | Default |
| --- | --- | --- |
| `title` | `string` | `Required` |
| `open` | `boolean` | `—` |
| `defaultOpen` | `boolean` | `false` |
| `onOpenChange` | `(open: boolean) => void` | `—` |
| `disabled` | `boolean` | `false` |
| `controlSize` | `"sm" \| "md" \| "lg" \| "xl"` | `"md"` |
| `headingLevel` | `2 \| 3 \| 4 \| 5 \| 6` | `—` |
| `Native HTML props` | `Omit<HTMLAttributes<HTMLDivElement>, "title" \| "onChange">` | `Forwarded` |
