Skip to main content
Neural UIv2.0.0Documentation
View v1 GitHub

Overlays and focus

Open Dialog, accept or reject closing and let Core manage the documented focus behavior.

Open, request, accept or reject

NeuDialogComponent is exported from @neural-ui/core/modal. The application owns open. Escape, backdrop or the close control can emit closeRequested; that request does not change open automatically.

Try acceptance and rejection below. Finish and close is an explicit application action, so it sets open to false directly. A title names the dialog. Do not convert this contract into an open model.

Open, request, accept or reject
ยท opened: 0 ยท closed: 0

Focus and lifecycle

Core manages initial focus, containment and focus return. restoreFocus is true by default; do not duplicate that return manually. disableClose blocks the built-in user dismissal paths; your application can still change open.

opened and closed report applied transitions and do not emit an initial lifecycle event. Use them for observation, not as a competing open value. Verify keyboard opening, Tab containment, rejection and final focus return.

Dialog is not every overlay

Dialog is a modal task with application-owned state. Popover is a contextual trigger directive, [neuPopover], with its own behavior. Read its API before choosing a binding: not every overlay has the Dialog state model.

Keep a deterministic initial state for SSR. The example starts closed and verifies focus work after browser interaction. Do not add undocumented global z-index options to provideNeuralUI.