Import
import {
NuiDialog,
NuiDialogActions,
NuiDialogClose,
NuiDialogDescription,
NuiDialogTitle,
} from '@needless-ui/angular/dialog';NuiDialog
Turns a native <dialog> into a Needless UI dialog.
| Name | Type | Default | Description |
|---|---|---|---|
openTwo-way | boolean | false | Whether the dialog is open. Bind it with [(open)]. |
modalInput | boolean | true | Opens as a modal, with a backdrop and an inert page behind it. |
dismissibleInput | boolean | true | Whether Escape and backdrop clicks close the dialog. |
sizeInput | 'sm' | 'md' | 'lg' | 'md' | Maximum width: sm (24rem), md (32rem) or lg (44rem). |
enterInput | NuiEnter | How it arrives: zoom, fade, drop, rise, unfold, flip, swing, slide or none. | |
motionInput | NuiMotion | The spring it moves with: snappy, bouncy, jelly, elastic, lazy, mechanical or none. | |
springInput | NuiSpring | Any spring, as { stiffness, damping, mass }, compiled to CSS at runtime. It overrides motion. | |
cornersInput | NuiCorners | The shape of its corners: round, squircle, bevel, scoop, notch or square. | |
radiusInput | NuiRadius | How big its corners are: none, small, medium, large or full. | |
densityInput | NuiDensity | How much room it takes: compact, regular or roomy. | |
closedOutput | string | Emits the return value each time the dialog closes. It’s empty when the dialog was dismissed. | |
closeMethod | (returnValue?: string) => void | Closes the dialog with an optional return value. |
Customization inputs you leave unset follow the nearest data-nui-* attribute. See the customization guide.
NuiDialogTitle
The dialog’s title. It gets an id and becomes the dialog’s aria-labelledby.
NuiDialogDescription
A short description, referenced by the dialog’s aria-describedby.
NuiDialogActions
A row of buttons at the bottom of the dialog, aligned to the end.
NuiDialogClose
Closes the surrounding dialog when clicked.
| Name | Type | Default | Description |
|---|---|---|---|
nuiDialogCloseInput | string | '' | The value the dialog closes with, emitted by (closed). |