---
title: Dialog
description: Present a labeled modal task with structured content and dismissal.
package: moraine
version: 0.11.0
repository: https://github.com/subframe7536/moraine
---

# Dialog

> Present a labeled modal task with structured content and dismissal.

## Anatomy

```text
Dialog [component; no DOM]
├── Dialog.Trigger [part; slot=trigger]
├── Dialog.Close [part]
└── overlay [slot]
    └── Dialog.Content [part; slot=content]
        ├── Dialog.Header [part; slot=header]
        │   ├── Dialog.Title [part; slot=title]
        │   └── Dialog.Description [part; slot=description]
        ├── contentClose [slot]
        ├── Dialog.Body [part; slot=body]
        └── Dialog.Footer [part; slot=footer]
```

Content is portaled and renders inside the overlay element. With `overlay={false}`, that element is an unstyled wrapper without the `overlay` slot.

## Usage

Use Dialog for a labeled modal task with title, description, body, and footer. Use
[BaseDialog](https://moraine.subf.dev/components/base-dialog.md) when you compose backdrop and content yourself. Use
[Sheet](https://moraine.subf.dev/components/sheet.md) or [Drawer](https://moraine.subf.dev/components/drawer.md) for a panel from a viewport edge. Use
[Popover](https://moraine.subf.dev/components/popover.md) for anchored interactive content that should not take over the
page. Use [Tooltip](https://moraine.subf.dev/components/tooltip.md) for a brief non-interactive hint. Use
[DropdownMenu](https://moraine.subf.dev/components/dropdown-menu.md) or [ContextMenu](https://moraine.subf.dev/components/context-menu.md) for an action
list. Use [Alert Dialog](https://moraine.subf.dev/components/alert-dialog.md) for confirm, info, warning, error, and
success prompts opened from an event handler.

The trigger and content share disclosure state through the root.

```tsx
import { Button, Dialog } from 'moraine'

export function Example() {
  return (
    <Dialog>
      <Dialog.Trigger as={Button}>Open</Dialog.Trigger>
      <Dialog.Content title="Settings">
        <Dialog.Body>Preferences</Dialog.Body>
        <Dialog.Footer>
          <Dialog.Close as={Button}>Done</Dialog.Close>
        </Dialog.Footer>
      </Dialog.Content>
    </Dialog>
  )
}
```

### Content composition

Use Content `title` and `description` for simple cases:

```tsx
<Dialog>
  <Dialog.Content title="Settings" description="Update your account.">
    <Dialog.Body>...</Dialog.Body>
    <Dialog.Footer>...</Dialog.Footer>
  </Dialog.Content>
</Dialog>
```

For a custom header layout, compose the anatomy parts:

```tsx
<Dialog.Content>
  <Dialog.Header>
    <Dialog.Title>Settings</Dialog.Title>
    <Dialog.Description>Update your account.</Dialog.Description>
  </Dialog.Header>
  <Dialog.Body>...</Dialog.Body>
  <Dialog.Footer>...</Dialog.Footer>
</Dialog.Content>
```

An explicit `Dialog.Header` replaces the header generated by Content's `title` and `description`.
`Dialog.Title` and `Dialog.Description` connect their IDs to the surface's accessible name and
description. Without a visible title, set `aria-label` or `aria-labelledby` on Content.

`Dialog.Close` is an explicit close control you can place inside the root; it is separate from
Content's automatic corner close button. Set root `closable={false}` to hide the corner button, or
`closeIcon` to replace its icon. Its accessible label comes from the `close` message; override it
with root `translations`. See [Localization](https://moraine.subf.dev/docs/localization.md). Root `transition={false}` turns
off the enter and exit animations, so content and overlay unmount as soon as the dialog closes.

### Focus and outside interaction

`modal` defaults to `true`: focus stays inside the surface, outside content is hidden from assistive
technology, and native outside pointer actions are prevented. Closing restores focus to the trigger.
Use `initialFocus` to choose the element that receives focus on open, or `false` to skip the move,
and `finalFocus` to choose where focus returns. Both apply only while `modal` is `true`.

Setting `modal={false}` allows focus to leave the surface, but does not disable Escape or outside
dismissal. `closeOnOverlayClick` and `closeOnEscape` control those close requests. Both default to
`true`. Scroll locking is independent: `preventScroll` defaults to `true`. For interaction with the
background page, also set `preventScroll={false}` and `overlay={false}`.

### Styling and portal placement

Apply `class` and object `style` directly to each rendered part. Root `classes` and `styles` set
slot defaults for every part: `trigger`, `overlay`, `content`, `header`, `title`, `description`,
`contentClose`, `body`, and `footer`. See
[Customization](https://moraine.subf.dev/docs/customization.md#the-4-layer-override-hierarchy) for precedence.

Set root `mount` to place Content in a chosen container. This also works for controlled
surfaces without a Trigger.

### Nested overlays

Nested roots keep dismissal and focus restoration local to the active layer. Escape closes the
topmost dialog or popover, then returns focus to its trigger inside the parent dialog.

```tsx
<Dialog>
  <Dialog.Content title="Workspace settings">
    <Popover>
      <Popover.Trigger as={Button}>Help</Popover.Trigger>
      <Popover.Content aria-label="Settings help">Workspace-only changes.</Popover.Content>
    </Popover>
    <Dialog>
      <Dialog.Trigger as={Button}>Confirm</Dialog.Trigger>
      <Dialog.Content title="Confirm changes">...</Dialog.Content>
    </Dialog>
  </Dialog.Content>
</Dialog>
```

### State and dismissal

Use controlled `open` with `onOpenChange` when the surrounding flow owns visibility.
`closeOnOverlayClick={false}` blocks an outside pointer press, and `closeOnEscape={false}` blocks
Escape. Both report the attempt through `onClosePrevented`. Provide a clear explicit close path when
either one is blocked.

```tsx
<Dialog
  open={open()}
  onOpenChange={setOpen}
  closeOnOverlayClick={false}
  closeOnEscape={false}
  onClosePrevented={onBlocked}
>
  <Dialog.Content title="Unsaved changes">
    <Dialog.Footer>
      <Button onClick={() => setOpen(false)}>Discard</Button>
      <Button onClick={() => setOpen(false)}>Save</Button>
    </Dialog.Footer>
  </Dialog.Content>
</Dialog>
```

### Structure and lifecycle

Use root `scrollable` for long content or `fullscreen` for a full-viewport task. `onExitComplete`
runs after the overlay and content finish their exit animations.

```tsx
<Dialog scrollable>
  <Dialog.Content title="Release notes">...</Dialog.Content>
</Dialog>
<Dialog fullscreen onExitComplete={() => setStatus('Exit animation completed')}>
  <Dialog.Content title="Release notes">...</Dialog.Content>
</Dialog>
```

### Keyboard interaction

| Key                    | Description                                                        |
| ---------------------- | ------------------------------------------------------------------ |
| <kbd>Escape</kbd>      | Requests dismissal when `closeOnEscape` is not `false`.            |
| <kbd>Tab</kbd>         | Moves focus forward through focusable controls inside the dialog.  |
| <kbd>Shift + Tab</kbd> | Moves focus backward through focusable controls inside the dialog. |

## Examples

### Delete a saved filter

Keep the filter visible until the user confirms. Cancel and backdrop dismissal leave it intact.

```tsx
import { Button, Dialog } from 'moraine'
import { createSignal, Show } from 'solid-js'

export function DeleteConfirmation() {
  const [exists, setExists] = createSignal(true)
  const [open, setOpen] = createSignal(false)

  return (
    <div class="flex gap-3 items-center">
      <Show when={exists()} fallback={<p class="text-sm">Saved filter removed.</p>}>
        <span class="text-sm">Saved filter: Assigned to me</span>
        <Dialog open={open()} onOpenChange={setOpen}>
          <Dialog.Trigger as={Button} variant="outline" size="sm">
            Delete
          </Dialog.Trigger>
          <Dialog.Content
            title="Delete saved filter?"
            description="Assigned to me will be removed from your saved filters."
          >
            <Dialog.Body>
              <p class="text-sm">You can create another filter later.</p>
            </Dialog.Body>
            <Dialog.Footer>
              <div class="flex gap-2 w-full justify-end">
                <Dialog.Close as={Button} variant="outline">
                  Cancel
                </Dialog.Close>
                <Button
                  variant="solid"
                  tone="danger"
                  onClick={() => {
                    setExists(false)
                    setOpen(false)
                  }}
                >
                  Delete filter
                </Button>
              </div>
            </Dialog.Footer>
          </Dialog.Content>
        </Dialog>
      </Show>
    </div>
  )
}
```

### Confirm workspace changes from settings

Nest a confirmation dialog and a help popover inside a parent dialog. Escape closes the topmost
layer and restores focus to its trigger.

```tsx
import { Button, Dialog, Popover } from 'moraine'

export function NestedOverlays() {
  return (
    <Dialog>
      <Dialog.Trigger as={Button} variant="outline">
        Open nested overlays
      </Dialog.Trigger>
      <Dialog.Content
        title="Workspace settings"
        description="Review help before confirming your workspace changes."
      >
        <Dialog.Footer class="flex-wrap gap-3">
          <Popover>
            <Popover.Trigger as={Button} variant="outline">
              View settings help
            </Popover.Trigger>
            <Popover.Content aria-label="Settings help" class="p-3">
              Changes apply to this workspace only.
            </Popover.Content>
          </Popover>
          <Dialog>
            <Dialog.Trigger as={Button}>Confirm workspace changes</Dialog.Trigger>
            <Dialog.Content
              title="Confirm changes"
              description="Escape closes this confirmation before closing workspace settings."
            >
              <Dialog.Footer>
                <Dialog.Close
                  as={Button}
                  variant="outline"
                  class="px-3 py-1.5 h-auto w-auto static"
                >
                  Return to settings
                </Dialog.Close>
              </Dialog.Footer>
            </Dialog.Content>
          </Dialog>
        </Dialog.Footer>
      </Dialog.Content>
    </Dialog>
  )
}
```

### Save unsaved configuration

Own visibility from the page. Toggle `closeOnOverlayClick` and `closeOnEscape` together to block
outside clicks and Escape. `onClosePrevented` counts blocked attempts until Save or Discard.

```tsx
import { Badge, Button, Dialog } from 'moraine'
import { createSignal, Show } from 'solid-js'

export function StateDismissal() {
  const [open, setOpen] = createSignal(false)
  const [allowDismiss, setAllowDismiss] = createSignal(false)
  const [preventedAttempts, setPreventedAttempts] = createSignal(0)

  return (
    <div class="flex flex-wrap gap-4 items-center">
      <Button onClick={() => setOpen(true)}>
        Open {allowDismiss() ? 'Dismissible' : 'Non-Dismissible'} Dialog
      </Button>

      <Button
        variant="outline"
        onClick={() => {
          setAllowDismiss((prev) => !prev)
          setPreventedAttempts(0)
        }}
      >
        Mode: {allowDismiss() ? 'Overlay and Escape' : 'Strict (Buttons Only)'}
      </Button>

      <Dialog
        open={open()}
        onOpenChange={setOpen}
        closeOnOverlayClick={allowDismiss()}
        closeOnEscape={allowDismiss()}
        onClosePrevented={() => setPreventedAttempts((c) => c + 1)}
      >
        <Dialog.Content
          title="Unsaved Configuration Changes"
          description="Explicit confirmation is required before navigating away."
        >
          <Dialog.Body>
            <div class="py-2 space-y-3">
              <p class="text-sm text-muted-foreground">
                {allowDismiss()
                  ? 'Press Escape or click the backdrop to dismiss.'
                  : 'Clicking outside or pressing Escape is blocked. Use the action buttons below.'}
              </p>
              <Show when={preventedAttempts() > 0}>
                <Badge variant="outline" class="text-danger border-danger">
                  Blocked {preventedAttempts()} outside dismissal attempt(s)
                </Badge>
              </Show>
            </div>
          </Dialog.Body>
          <Dialog.Footer>
            <div class="flex gap-2 w-full justify-end">
              <Button
                variant="outline"
                onClick={() => {
                  setOpen(false)
                  setPreventedAttempts(0)
                }}
              >
                Discard Changes
              </Button>
              <Button
                onClick={() => {
                  setOpen(false)
                  setPreventedAttempts(0)
                }}
              >
                Save & Apply
              </Button>
            </div>
          </Dialog.Footer>
        </Dialog.Content>
      </Dialog>
    </div>
  )
}
```

### Read long release notes

Use `scrollable` so long content scrolls with the overlay, or `fullscreen` for a full-viewport
task.

```tsx
import { Button, Dialog } from 'moraine'
import { For } from 'solid-js'

export function ScrollableFullscreen() {
  const SCROLLABLE_LINES = Array.from(
    { length: 100 },
    (_, index) => `Release note line ${index + 1}`,
  )

  return (
    <div class="flex flex-wrap gap-3 items-center">
      <Dialog scrollable>
        <Dialog.Trigger as={Button} variant="soft" tone="neutral">
          Overlay scroll dialog
        </Dialog.Trigger>
        <Dialog.Content title="Release Notes" description="Long content scrolls with the overlay.">
          <Dialog.Body>
            <div class="space-y-1">
              <For each={SCROLLABLE_LINES}>
                {(line) => <p class="text-sm text-foreground">{line}</p>}
              </For>
            </div>
          </Dialog.Body>
        </Dialog.Content>
      </Dialog>
      <Dialog fullscreen>
        <Dialog.Trigger as={Button} variant="soft" tone="neutral">
          Full screen dialog
        </Dialog.Trigger>
        <Dialog.Content title="Release Notes" description="Full screen dialog content.">
          <Dialog.Body>
            <div class="space-y-1">
              <For each={SCROLLABLE_LINES}>
                {(line) => <p class="text-sm text-foreground">{line}</p>}
              </For>
            </div>
          </Dialog.Body>
        </Dialog.Content>
      </Dialog>
    </div>
  )
}
```

### Provision a cluster and wait for exit

Open a provisioning dialog from its trigger. `onExitComplete` updates status after overlay and
content finish their exit animations.

```tsx
import { Badge, Button, Dialog } from 'moraine'
import { createSignal } from 'solid-js'

export function StructureLifecycle() {
  const [exits, setExits] = createSignal(0)
  const [status, setStatus] = createSignal('Idle')

  return (
    <div class="flex flex-wrap gap-4 items-center">
      <Dialog
        onExitComplete={() => {
          setExits((c) => c + 1)
          setStatus('Exit animation completed')
        }}
      >
        <Dialog.Trigger as={Button}>Open Provisioning Dialog</Dialog.Trigger>
        <Dialog.Content
          title="Provision Production Database"
          description="Configure clustering, replication nodes, and automated backup schedules."
        >
          <Dialog.Body>
            <div class="text-muted-foreground leading-relaxed py-2 space-y-2">
              <p>
                Provisioning will allocate dedicated compute instances and initialize encryption
                keys.
              </p>
            </div>
          </Dialog.Body>
          <Dialog.Footer>
            <div class="flex gap-2 w-full justify-end">
              <Button variant="outline">Cancel</Button>
              <Button>Provision Cluster</Button>
            </div>
          </Dialog.Footer>
        </Dialog.Content>
      </Dialog>

      <div class="text-xs text-muted-foreground flex gap-2 items-center">
        <span>Lifecycle status:</span>
        <Badge variant="outline">{status()}</Badge>
        <span>(Completed exits: {exits()})</span>
      </div>
    </div>
  )
}
```

### Open a dialog from page state

A page button owns `open`. The completed-exit count updates after exit motion finishes.

```tsx
import { Button, Dialog } from 'moraine'
import { createSignal } from 'solid-js'

export function ControlledLifecycle() {
  const [open, setOpen] = createSignal(false)
  const [exitCount, setExitCount] = createSignal(0)

  return (
    <div class="flex gap-3 items-center">
      <Button variant="outline" onClick={() => setOpen(true)}>
        Open dialog
      </Button>
      <p class="text-sm text-muted-foreground">Completed exits: {exitCount()}</p>
      <Dialog
        open={open()}
        onOpenChange={setOpen}
        onExitComplete={() => setExitCount((count) => count + 1)}
      >
        <Dialog.Content title="Controlled dialog">
          <Dialog.Body>
            <p class="text-sm">The parent owns visibility and observes completed exit motion.</p>
          </Dialog.Body>
          <Dialog.Footer>
            <Button onClick={() => setOpen(false)}>Close</Button>
          </Dialog.Footer>
        </Dialog.Content>
      </Dialog>
    </div>
  )
}
```

## API Reference

### Attributes

| Attributes | Slot | Description |
| --- | --- | --- |
| `data-closed` | `dialog-trigger`, `dialog-content`, `dialog-overlay` | Present when disclosure or transition content is closed. |
| `data-disabled` | `dialog-trigger` | Present when the component, slot, or item is disabled. |
| `data-expanded` | `dialog-trigger`, `dialog-content`, `dialog-overlay` | Present when the panel, accordion, or menu is expanded. |
| `data-overlay-scroll` | `dialog-overlay` | Present when scrolling is owned by the overlay. |
| `data-transition` | `dialog-content`, `dialog-overlay` | Present while a target participates in a visibility transition. |
| `data-footer` | `dialog-body` | Present when the component renders footer content. |
| `data-header` | `dialog-body` | Present when the component renders header content. |
| `data-scroll` | `dialog-body` | Present when the content region owns scrolling. |

### Props

#### Dialog

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| closable | boolean \| undefined | true | Whether to show the corner close button inside the content. Its accessible label comes from<br>the `close` translation. |
| closeIcon | IconT.Name \| undefined | 'icon-close' | Name of the icon shown in the corner close button. |
| closeOnEscape | boolean \| undefined | true | Whether Escape dismisses the shell.<br>`false` blocks Escape and reports it through `onClosePrevented`. |
| closeOnOverlayClick | boolean \| undefined | true | Whether a pointer press outside the content, such as on the backdrop, dismisses the shell.<br>`false` blocks the press and reports it through `onClosePrevented`. |
| defaultOpen | boolean \| undefined | false | Initial open state when uncontrolled. Ignored while `open` is set. |
| finalFocus | HTMLElement \| (() => HTMLElement \| undefined) \| false \| undefined | — | Element (or accessor resolving to one) that receives focus after the shell closes, or<br>`false` to skip the close-time focus restore. Defaults to the trigger, then the element<br>focused when the shell opened. An accessor that returns `undefined` restores no focus. Only<br>applies while `modal` is `true`. |
| fullscreen | boolean \| undefined | false | Whether the surface fills the viewport. |
| id | string \| undefined | — | Unique identifier used to derive the content id, which becomes `<id>-content`. Generated<br>when omitted. |
| initialFocus | HTMLElement \| (() => HTMLElement \| undefined) \| false \| undefined | — | Element (or accessor resolving to one) that receives focus when the shell opens, or `false`<br>to skip the open-time focus move. Defaults to the first focusable element inside the<br>content, preferring an `[autofocus]` or `[data-autofocus]` descendant, and to the content<br>itself when opened by touch. An accessor that returns `undefined` falls back to the default.<br>Only applies while `modal` is `true`. |
| modal | boolean \| undefined | true | Whether the surface contains focus, restores focus on close, hides outside content from<br>assistive technology, and prevents the native default action of outside pointer events.<br>Outside pointer dismissal is controlled by `closeOnOverlayClick`.<br>Escape dismissal is controlled by `closeOnEscape`. When `false`, focus is neither trapped,<br>moved on open nor restored on close, so `initialFocus` and `finalFocus` have no effect. |
| mount | Node \| undefined | — | DOM node that `BaseDialog.Portal`, and the content of `Dialog`, `Sheet` and `Drawer`, render into,<br>for example a container element or a shadow root. A `mount` on `BaseDialog.Portal` takes<br>precedence. Defaults to the `body` of the trigger's document. |
| onClosePrevented | (() => void) \| undefined | — | Called with no arguments when Escape (`closeOnEscape` is `false`) or an outside press<br>(`closeOnOverlayClick` is `false`) tried to close the shell and was blocked. |
| onExitComplete | (() => void) \| undefined | — | Called once after a close has finished: the exit motion is over and the content is<br>unmounted. With `transition` set to `false` there is no motion to wait for. It is not called<br>when the content is removed while still open. |
| onOpenChange | ((open: boolean) => void) \| undefined | — | Called with the next open state when the trigger, a close part, Escape or an outside press<br>requests a change. It is not called when `open` is changed from outside, and it does not<br>apply the change itself when `open` is controlled: update `open` in the handler. |
| open | boolean \| undefined | — | Controlled open state. Pair it with `onOpenChange`; leave it `undefined` to let the component<br>manage its own state (see `defaultOpen`). |
| overlay | boolean \| undefined | true | Whether to render the styled backdrop behind the content. When `false` the content is shown<br>without a backdrop; outside presses still follow `closeOnOverlayClick`. |
| preventScroll | boolean \| undefined | true | Whether body scroll should be locked while the shell is present. |
| scrollable | boolean \| undefined | false | Whether the overlay scrolls its content. |
| transition | boolean \| undefined | true | Whether enter and exit transition animations play. When `false`, the content and overlay<br>mount and unmount without waiting for an animation to end. The value is read when content<br>registers, so changes take effect the next time content mounts. |
| translations | Translations \| undefined | — | Overrides for the built-in strings of this dialog, merged over the `MoraineProvider` locale.<br>Only `close` is used here: the accessible label of the corner close button. |
| children | JSX.Element \| undefined | — | Composed trigger and content primitives. |
| classes | Classes \| undefined | — | Family slot class defaults for this instance. |
| styles | Styles \| undefined | — | Family slot style defaults for this instance. |

**`finalFocus` example**

```tsx
import { Button, Dialog } from 'moraine'

<Dialog finalFocus={() => document.getElementById('search') ?? undefined}>
  <Dialog.Trigger as={Button}>Open</Dialog.Trigger>
  <Dialog.Content title="Settings">Preferences</Dialog.Content>
</Dialog>
```

**`initialFocus` example**

```tsx
import { Button, Dialog } from 'moraine'
import { createSignal } from 'solid-js'

const [input, setInput] = createSignal<HTMLInputElement>()

<Dialog initialFocus={() => input()}>
  <Dialog.Trigger as={Button}>Rename</Dialog.Trigger>
  <Dialog.Content title="Rename">
    <input ref={setInput} />
  </Dialog.Content>
</Dialog>
```

**`mount` example**

```tsx
import { Button, Dialog } from 'moraine'

const container = document.getElementById('overlay-root') ?? document.body

<Dialog mount={container}>
  <Dialog.Trigger as={Button}>Open</Dialog.Trigger>
  <Dialog.Content title="Settings">Preferences</Dialog.Content>
</Dialog>
```

**`onOpenChange` example**

```tsx
import { Button, Dialog } from 'moraine'
import { createSignal } from 'solid-js'

const [open, setOpen] = createSignal(false)

<Dialog open={open()} onOpenChange={setOpen}>
  <Dialog.Trigger as={Button}>Open</Dialog.Trigger>
  <Dialog.Content title="Settings">Preferences</Dialog.Content>
</Dialog>
```

**`translations` example**

```tsx
import { Button, Dialog } from 'moraine'

<Dialog translations={{ close: 'Fermer' }}>
  <Dialog.Trigger as={Button}>Open</Dialog.Trigger>
  <Dialog.Content title="Réglages">Préférences</Dialog.Content>
</Dialog>
```

#### Dialog.Trigger

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| disabled | boolean \| undefined | — | Whether this trigger is disabled. |
| as | T \| undefined | 'button' | Element or component to render as. |
| children | JSX.Element \| undefined | — | Trigger label and visual content. |
| class | SlotClassValue \| undefined | — | Class applied to the component root or trigger element. |
| style | SlotStyleValue \| undefined | — | Style applied to the component root or trigger element. |

#### Dialog.Content

Props for Dialog.Content.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| description | JSX.Element \| undefined | — | Description rendered below the title in the generated header, and referenced by<br>`aria-describedby`. Ignored when the children include an explicit `Dialog.Header`. |
| title | JSX.Element \| undefined | — | Title rendered in a generated header, and used as the accessible name of the dialog<br>(`aria-labelledby`, unless `aria-label` is set). Ignored when the children include an<br>explicit `Dialog.Header`. |
| as | T \| undefined | 'div' | Element or component to render as. |
| children | JSX.Element \| Component<ContentRenderProps> \| undefined | — | Composable dialog parts or render function receiving close action.<br>A render function must declare its parameter, even when unused. A zero-argument<br>function is called as an accessor and is not mounted as a component. |
| class | SlotClassValue \| undefined | — | Class applied to the component root or trigger element. |
| style | SlotStyleValue \| undefined | — | Style applied to the component root or trigger element. |

#### Dialog.Header

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| as | T \| undefined | 'div' | Element or component to render as. |
| children | JSX.Element \| undefined | — | Content rendered inside the element. |
| class | SlotClassValue \| undefined | — | Class applied to the component root or trigger element. |
| style | SlotStyleValue \| undefined | — | Style applied to the component root or trigger element. |

#### Dialog.Title

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| id | string \| undefined | — | Unique identifier applied to the rendered element. |
| as | T \| undefined | 'h2' | Element or component to render as. |
| children | JSX.Element \| undefined | — | Content rendered inside the element. |
| class | SlotClassValue \| undefined | — | Class applied to the component root or trigger element. |
| style | SlotStyleValue \| undefined | — | Style applied to the component root or trigger element. |

#### Dialog.Description

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| id | string \| undefined | — | Unique identifier applied to the rendered element. |
| as | T \| undefined | 'p' | Element or component to render as. |
| children | JSX.Element \| undefined | — | Content rendered inside the element. |
| class | SlotClassValue \| undefined | — | Class applied to the component root or trigger element. |
| style | SlotStyleValue \| undefined | — | Style applied to the component root or trigger element. |

#### Dialog.Body

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| as | T \| undefined | 'div' | Element or component to render as. |
| children | JSX.Element \| undefined | — | Content rendered inside the element. |
| class | SlotClassValue \| undefined | — | Class applied to the component root or trigger element. |
| style | SlotStyleValue \| undefined | — | Style applied to the component root or trigger element. |

#### Dialog.Footer

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| as | T \| undefined | 'div' | Element or component to render as. |
| children | JSX.Element \| undefined | — | Content rendered inside the element. |
| class | SlotClassValue \| undefined | — | Class applied to the component root or trigger element. |
| style | SlotStyleValue \| undefined | — | Style applied to the component root or trigger element. |

#### Dialog.Close

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| disabled | boolean \| undefined | — | Whether this trigger is disabled. |
| as | T \| undefined | 'button' | Element or component to render as. |
| children | JSX.Element \| undefined | — | Trigger label and visual content. |
| class | SlotClassValue \| undefined | — | Class applied to the component root or trigger element. |
| style | SlotStyleValue \| undefined | — | Style applied to the component root or trigger element. |
