Skip to content

Dialog

<ts-dialog> vv0.4.0

The ts-dialog component.

Open in Storybook for interactive demos.

<ts-dialog size="sm">Content</ts-dialog>
PropertyAttributeTypeDefaultDescription
dismissibledismissiblebooleantrueWhether the dialog can be dismissed via close button, Escape, or overlay click.
headingheadingstring | undefinedThe dialog heading text.
openopenbooleanfalseWhether the dialog is open.
sizesize"lg" | "md" | "sm"'sm'The dialog’s width size preset.
EventDetailBubblesComposedDescription
tsClosevoidYesYesEmitted when the dialog is closed.
MethodSignatureDescription
closeclose() => Promise<void>Programmatically close the dialog.
showshow() => Promise<void>Programmatically open the dialog.
NameDescription
*(default)*Default slot for dialog body content.
footerFooter content (e.g., action buttons).

Use ::part() to style internal elements:

PartDescription
bodyThe body content wrapper.
closeThe close button.
dialogThe dialog container.
footerThe footer wrapper.
headerThe heading wrapper.
overlayThe backdrop overlay.
ts-dialog::part(body) {
/* your custom styles */
}
<ts-dialog size="sm">Content</ts-dialog>
import { TsDialog } from '@tessera-ui/react';
<TsDialog dismissible size="sm">Content</TsDialog>