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

PropTypeDefaultDescription
open bindable booleanfalseWhether it is open. Bind it with `bind:open`.
title required string—Heading text.
alert booleanfalseUse 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.
/docs/dialog Truss UI · MIT