Components / Overlays
Dialog
A modal dialog on the native <dialog> element with header/body/footer divisions.
@ruckc/truss-ui Overlays
Import
import { Dialog } from '@ruckc/truss-ui'; Playground
size
API
| Prop | Type | Default | Description |
|---|---|---|---|
open bindable | boolean | false | Whether it is open. Bind it with `bind:open`. |
title required | string | — | Heading text. |
alert | boolean | false | Use role=alertdialog (confirmations that need a response). |
size | 'sm' | 'md' | 'lg' | 'md' | Control size: `sm` (24px), `md` (32px, default) or `lg` (40px). |
children required snippet | Snippet | — | Content, as a Svelte snippet. |
footer snippet | Snippet | — | Footer content, as a Svelte snippet. |
onclose event | () => void | — | Called when it is dismissed. |