Example of Custom Dialogs in React Dialog Component


This example demonstrates that you can create different types of custom dialogs such as alert, confirm, and prompt dialogs. The buttons “alert”, “confirm”, and “prompt” are used to open the corresponding dialogs.

More Details...


The dialog component is used to create alert, prompt, and confirmation dialogs using content, and buttons property. The content property accepts both string and HTML element as content.

  • Alert - Used to show errors, warnings, and information that needs user awareness.
  • Prompt - Used to get input from the user.
  • Confirmation - Used to get approval from user that appears before any critical action.

More information on the Dialog instantiation can be found in the documentation section.