id | string | — | id="example" | Unique identifier in template mode. |
template | boolean | false | template | Register a template without displaying it immediately. |
as | "dialog" | undefined | — | as={value} | Marker for embedded mode. |
open | boolean | false | open | Visibility in panel mode; supports bind:open. |
onOpenChange | (open: boolean) => void | — | onOpenChange={(value) => { /* handle value */ }} | Callback when panel-mode visibility changes. |
backdrop | DialogBackdrop | "opaque" | backdrop={value} | Backdrop variant. Shares backdrop visuals with ImageViewer; Dialog still manages closing and motion. |
size | DialogSize | "md" | size={value} | Panel size. |
closeOnOutside | boolean | true | closeOnOutside | Close when the backdrop outside the panel is clicked. false prevents this; empty space inside the panel never closes it. Consider false for unsaved forms or choices that require explicit confirmation. |
closeOnEscape | boolean | true | closeOnEscape | Whether Escape closes the dialog. |
pinOffset | number | — | pinOffset={42} | Shared offset in pixels for built-in and external Pin. When omitted, a token scaled with the root font supplies 16px for sm/md or 20px for lg. |
pinOffsetX | number | — | pinOffsetX={42} | Override the horizontal offset for built-in and external Pin. Takes precedence over pinOffset. |
pinOffsetY | number | — | pinOffsetY={42} | Override the vertical offset for built-in and external Pin. Takes precedence over pinOffset. |
role | "dialog" | string | "dialog" | role="Example" | Accessible role of the panel. |
title | string | — | title="Example" | Generate a built-in text title. Ignored when an external child with as="title" exists. |
separator | boolean | — | separator | Control the divider under the title. None is generated without a title. Defaults to false for sm and true for md/lg. |
showCloseButton | boolean | true | showCloseButton | Show the built-in close button in the upper right; does not hide an external close-role child. |
closeLabel | string | LocaleProvider close message | closeLabel="Example" | Accessible name of the built-in close button, defaulting to the current LocaleProvider close message. |
parts | ComponentPartsOf<{ Button: typeof Button; Text: typeof Text; Separator: typeof Separator }> | — | parts={partsOptions} | Configure only the actual built-in close Button, title Text, and Separator. Does not affect explicit children or footer components; Dialog owns title id, children, and ARIA wiring. |
children | Snippet | — | <Dialog>Content</Dialog> | Dialog content. |