# Dialog

Modal overlay built on the native <dialog> element — scroll-lock and backdrop dismiss handled automatically.

**Install:** `nimbus-docs add dialog`  
**Source:** `src/components/ui/dialog/`  
**Canonical:** https://nimbus-docs.com/components/dialog/

## Agent payload (JSON)

```json
{
  "slug": "dialog",
  "name": "Dialog",
  "description": "Modal dialog with focus-trap and body-scroll lock.",
  "tagline": "Modal overlay built on the native <dialog> element — scroll-lock and backdrop dismiss handled automatically.",
  "install": "nimbus-docs add dialog",
  "sourcePath": "src/components/ui/dialog/",
  "canonicalUrl": "https://nimbus-docs.com/components/dialog/",
  "props": [
    {
      "name": "id",
      "type": "string",
      "required": false,
      "description": "Dialog prop. Used to target the modal via `document.getElementById(id).showModal()`."
    }
  ],
  "registryDependencies": [
    "cn"
  ],
  "dependencies": []
}
```
