Angular Dialog Component | Customizable Modal Dialog | Syncfusion
Overview
The Angular Dialog is a useful user interface (UI) component for informing users about critical information, errors, warnings, and questions, as well as confirming decisions and collecting input from users. The component has a rich set of built-in features such as action buttons, positioning, animations, dragging, resizing, templating, and more with mobile dialog support. The dialog provides two different types: modal dialogs and non-modal dialogs (modeless) based on interactions.
Modal dialogs (modal window)
The Angular modal dialog component comes with two different types of dialogs, modal and non-modal (modeless):
- Modal dialogs force users to interact with them before continuing. So, it is used to show important interaction information and non-continuous process information (for example, a sign-up or login form).
- Non-modal dialogs allow users to interact outside the dialog box even if it is in an active state, which is suitable for frequent and nonblocking dialogs (for example, find-and-replace dialogs).
Action buttons
The Angular dialog component provides built-in support to perform actions through buttons, which define necessary callback functions to handle user input.
Positioning
Users can position a dialog wherever they want in a page. It is easy to configure this through built-in positions or any custom axis value (for example, top left, bottom right, top right, bottom left, 100 75, etc.).
Overlays
Angular Modal dialogs create overlays on open modal windows that provide options for a user to control the closing behavior of a dialog while interacting with it.

Additional dialogs
Users can launch multiple dialogs simultaneously or one above the other based on their z-index (z-depth) to make additional dialogs (nested modal dialogs).
Close options
The modal dialog can be closed by clicking on a close icon, with an overlay click, or by pressing the ESC key. Users can restrict the closing behavior of a dialog based on its callback function parameters.
Right-to-left (RTL)
The Angular dialog component supports right-to-left (RTL) rendering. Users can change the text direction and layout of the dialog component from right to left. This improves the user experience and accessibility for those who use RTL languages.

Accessibility
- Fully supports WAI-ARIA accessibility, which helps dialogs be accessed by on-screen readers and assistive devices.
- Follows WAI-ARIA Best Practices for implementing keyboard interaction.
- The UI element visuals such as foreground color, background color, line spacing, text, and images were designed based on the WCAG 2.0 standard.s

Responsiveness
The Angular dialog component is highly configurable to make mobile dialogs and better user experiences across phone, tablet, and desktop form factors.
Themes
The Angular Dialog component has several built-in themes such as Material, Bootstrap, Fabric (Office 365), Tailwind CSS, and High Contrast. Users can customize any one of these built-in themes or create new themes to achieve their own desired look and feel either by simply overriding SASS variables or using our Theme Studio application.
Developer-friendly APIs
Developers can control the appearance and behaviors of a dialog, including its positioning, content, and animation, using a rich set of APIs.
Angular Dialog Code Example
Easily get started with Angular Dialog using a few simple lines of HTML and TS code, as demonstrated below. Also explore our Angular Dialog Example that shows you how to render the Dialog in Angular.
<div class="control-section"> <ejs-dialog #Dialog [buttons]='dlgButtons' [header]='header' [animationSettings]='animationSettings' [showCloseIcon]='showCloseIcon' [target]='target' [width]='width' (open)="dialogOpen()" (close)="dialogClose()"> <ng-template #content> <p>In the Succinctly series, Syncfusion created a robust, free library of more than 130 technical e-books formatted for PDF, Kindle, and EPUB.</p> </ng-template> </ejs-dialog> </div>
import { Component, ViewEncapsulation, ViewChild, AfterViewInit } from '@angular/core'; import { DialogComponent, ButtonPropsModel } from '@syncfusion/ej2-angular-popups'; import { AnimationSettingsModel } from '@syncfusion/ej2-splitbuttons'; /** * Default Dialog Component */ @Component({ selector: 'control-content', templateUrl: 'default.html', styleUrls: ['default.css'], encapsulation: ViewEncapsulation.None }) export class BasicDialogComponent implements AfterViewInit { @ViewChild('Dialog') public Dialog: DialogComponent; public header: string = 'About SYNCFUSION Succinctly Series'; public showCloseIcon: Boolean = true; public width: string = '50%'; public animationSettings: AnimationSettingsModel = { effect: 'None' }; public target: string = '.control-section'; ngAfterViewInit(): void { document.getElementById('dlgbtn').focus(); } // On Dialog close, 'Open' Button will be shown public dialogClose = (): void => { document.getElementById('dlgbtn').style.display = ''; } // On Dialog open, 'Open' Button will be hidden public dialogOpen = (): void => { document.getElementById('dlgbtn').style.display = 'none'; } public dlgBtnClick = (): void => { window.open('https://www.syncfusion.com/company/about-us'); } public BtnClick = (): void => { this.Dialog.show(); } public dlgButtons: ButtonPropsModel[] = [{ click: this.dlgBtnClick.bind(this), buttonModel: { content: 'Learn More', isPrimary: true } }]; }
Transform your applications today by downloading our free evaluation version
Syncfusion Angular Resources