# Accordion

Related disclosure sections with optional single or multiple expansion.

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, Accordion } from "@flood-md/react";
import "@flood-md/react/styles.css";

export function Example() {
  return (
    <FloodRoot>
      <Accordion label="Questions" items={[{value:"install",title:"How do I install Flood?",content:"Install the packages and import the stylesheet."}]} />
    </FloodRoot>
  );
}
```

## Design notes

- Headings contain native disclosure buttons. Set headingLevel for the surrounding document.
- Enter/Space toggle. Tab visits available triggers and open panel contents. ArrowUp/Down and Home/End move among enabled top-level triggers without opening panels.

## API reference

| Prop | Values | Default |
| --- | --- | --- |
| `label` | `string` | `Required` |
| `items` | `readonly AccordionItem[]` | `Required` |
| `expansionMode` | `"single" \| "multiple"` | `"single"` |
| `value` | `readonly string[]` | `—` |
| `defaultValue` | `readonly string[]` | `[]` |
| `onValueChange` | `(value: string[]) => void` | `—` |
| `disabled` | `boolean` | `false` |
| `controlSize` | `"sm" \| "md" \| "lg" \| "xl"` | `"md"` |
| `headingLevel` | `2 \| 3 \| 4 \| 5 \| 6` | `3` |
| `Native HTML props` | `Omit<HTMLAttributes<HTMLDivElement>, "children" \| "role" \| "defaultValue" \| "onChange">` | `Forwarded` |
