# Popover

A nonmodal contextual dialog in the native top layer.

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

export function Example() {
  return (
    <FloodRoot>
      <Popover title="Project settings" trigger={trigger => <Button {...trigger}>Settings</Button>}>Project details.</Popover>
    </FloodRoot>
  );
}
```

## Design notes

- Forward all trigger props and ref.
- Escape, outside pointer and focus leaving dismiss. Focus enters content and returns when appropriate; Tab is not trapped.
- Closed content unmounts; keep persistent data in the host. Uses native Popover API within the existing DOM/theme scope.

## API reference

| Prop | Values | Default |
| --- | --- | --- |
| `title` | `string` | `Required` |
| `chrome` | `"default" \| "minimal"` | `—` |
| `trigger` | `(props: OverlayTriggerProps) => ReactNode` | `Required` |
| `children` | `ReactNode` | `—` |
| `open` | `boolean` | `—` |
| `defaultOpen` | `boolean` | `false` |
| `onOpenChange` | `(open: boolean) => void` | `—` |
| `disabled` | `boolean` | `false` |
| `side` | `"top" \| "bottom" \| "left" \| "right"` | `"bottom"` |
| `align` | `"start" \| "center" \| "end"` | `"start"` |
| `closeLabel` | `string` | `"Close"` |
| `initialFocusRef` | `RefObject<HTMLElement \| null>` | `—` |
| `positionReference` | `RefObject<HTMLElement \| null>` | `—` |
| `Native HTML props` | `Omit<HTMLAttributes<HTMLDivElement>, "children" \| "title" \| "role">` | `Forwarded` |
