The nuiDialog directive turns a native <dialog> into a Needless UI dialog. The browser provides the modal behavior: the page behind becomes inert, focus stays inside, Escape closes it and focus returns to the opener.
Bind [(open)] to a signal, and give close buttons a value with nuiDialogClose="…" to learn how the dialog was closed.
Confirmation
A destructive confirmation. The safe choice has autofocus, and the chosen value arrives through (closed).
Form in a dialog
Dialogs can hold any content. Here the first field receives focus when the dialog opens.
Not dismissible
With [dismissible]="false", Escape and backdrop clicks are ignored, so the user has to pick an option.