Dialog overview
Dialog provides a styled modal shell with backdrop dismissal, focus trapping, and close reason outputs. For full DOM ownership, use the separate headless dialog docs.
Imports
Import the wrapper when your team wants a ready-made panel, header, and close affordance.
Wrapper imports
ts
import { TngDialogComponent } from '@tailng-ui/components';
Usage patterns
Control the open state from your feature and project any body or footer content into the wrapper.
Wrapper usage
html
<button type="button" (click)="open.set(true)">Open review</button>
<tng-dialog
title="Review changes"
description="Confirm before publishing the release."
[open]="open()"
(openChange)="open.set($event)"
(closed)="onClosed($event)"
>
<p>Wrapper dialog body content.</p>
</tng-dialog>
Ship this release?
The same wrapper dialog shown with local CSS or a Tailwind-flavored content shell.
Wrapper dialog (plain CSS)
last close reason: none
Wrapper dialog (tailwind shell)
last close reason: none
Keyboard baseline
Tab/Shift+Tabcycles focus inside the dialog panel.Escapecloses when dismissal is enabled.- Backdrop pointer down closes when
closeOnBackdropis enabled. - Focus returns to the trigger when wrapper focus restoration is active.