Use modals in UI Builder with components to provide alerts or calls to action for a user. UI Builder comes with modals to save time and effort.

What Modals are

Modals, also known as dialogs, are windows that overlay another content window. Modals take control of the user experience. Users cannot interact with the overlaid window until the modal is closed. Modals can contain different types of content such as:
  • Static text
  • Dynamic text
  • Forms
  • Images
  • Buttons

UI Builder has preconfigured modals available. You can add a modal to your component. Then, configure the content of the modal, and how it displays on the screen. Add an event handler to the modal to perform an action when a user selects it. The action can alert a user about something, or ask a user to confirm an action. A modal is a way to ensure that a user knows what is happening. For example, a modal may ask a user to confirm a selection before continuing whatever action they are performing on the main page.

Modal Anatomy

Modals in UI Builder can have:
  • Modal header
  • Modal content
  • Close dialog button (no action taken by the modal)
  • At least one Modal button (action can be taken by the modal)

Diagram showing the different parts of modals.

Modal types

Different types of modals are available in UI Builder, as shown in the following table.

Event handlers and modals

Expose events to modals to handle call-to-action events. For example, a primary action, secondary action, and so on. You configure the data by adding an event handler and invoking a data resource. It is as simple as adding a new event handler for the component that has a modal. Or you can add an event handler to the modal itself. You select the event that you want associated with the component or modal and add it. See Add modal to component for detailed instructions.