<ts-dialog> vv0.4.0
The ts-dialog component.
Open in Storybook for interactive demos.
<ts-dialog size="sm">Content</ts-dialog>
| Property | Attribute | Type | Default | Description |
|---|
dismissible | dismissible | boolean | true | Whether the dialog can be dismissed via close button, Escape, or overlay click. |
heading | heading | string | undefined | — | The dialog heading text. |
open | open | boolean | false | Whether the dialog is open. |
size | size | "lg" | "md" | "sm" | 'sm' | The dialog’s width size preset. |
| Event | Detail | Bubbles | Composed | Description |
|---|
tsClose | void | Yes | Yes | Emitted when the dialog is closed. |
| Method | Signature | Description |
|---|
close | close() => Promise<void> | Programmatically close the dialog. |
show | show() => Promise<void> | Programmatically open the dialog. |
| Name | Description |
|---|
*(default)* | Default slot for dialog body content. |
footer | Footer content (e.g., action buttons). |
Use ::part() to style internal elements:
| Part | Description |
|---|
body | The body content wrapper. |
close | The close button. |
dialog | The dialog container. |
footer | The footer wrapper. |
header | The heading wrapper. |
overlay | The backdrop overlay. |
<ts-dialog size="sm">Content</ts-dialog>
import { TsDialog } from '@tessera-ui/react';
<TsDialog dismissible size="sm">Content</TsDialog>