NEURALNG
FEEDBACKBETA

ConfirmDialog

A service-driven native confirmation surface with deterministic channels, signal results, guarded async actions and complete modal accessibility.

Native top layerSignal referencesAsync guards

GET STARTED

Import

The standalone host and injectable service share one granular entry point.

app.ts TypeScript
import {
  NeuralConfirmDialog,
  NeuralConfirmationService,
} from '@neural-ng/core/confirm-dialog';

@Component({ imports: [NeuralConfirmDialog] })
export class WorkspacePage {
  private readonly confirmation = inject(NeuralConfirmationService);
}

Service-driven confirmation

Render the host once. Any descendant service consumer can open it without owning a duplicate visible model.

No confirmation completed yet.

Async action guard

While an action is pending, buttons are disabled and the accept action exposes aria-busy. Returning false deliberately keeps the dialog open.

Ready

Independent keyed hosts

Keys create deterministic channels for different layout regions or policies. Requests only reach a host with the same normalized key.

Latest same-key request wins

A new request replaces only the active request sharing its key. The previous ref completes as dismissed ยท replaced; no hidden queue accumulates.

No request replaced yet.

Per-request options

Labels, icons, action visibility and dismissal policies can be overridden per request without changing the host.

Action errors

A thrown async action emits actionError, returns the dialog to an interactive state and leaves closing policy to the application.

No action error.

Unstyled and typed slots

Native dialog behavior, modal focus, ARIA links and service state remain while every ConfirmDialog and inherited Dialog visual class is removed.

Contract boundaries

Service

Owns active keyed requests and refs.

Host

Owns modal rendering, focus and actions.

Application

Owns business effects and error messaging.