Learn how to add a modal in UI Builder. A modal is a window that appears when you click a component. For example, a modal might display when a delete button component is clicked, prompting the user to confirm deleting a record.

Before you begin

Role required: ui_builder_admin

About this task

A modal is a screen that appears when an event handler is triggered by an event such as a button being clicked. The following procedure shows an example of how to add a Confirm modal and an associated event handler to a button component.

Procedure

  1. Navigate to All > Now experience framework > UI Builder.
  2. Open an experience to work in or create an experience by selecting Create > Experience.
    See Configure how users interact with your applications in UI Builder for more information on creating experiences.
  3. Open or create a page or page variant.
    For more information about how to create a page in UI Builder, see Create a page in UI Builder.
  4. Add a modal to the page.
    1. Select the + icon in the content tree next to Modals and popovers.
      Arrow pointing to + next to Modals and popovers line item in content tree.
    2. Choose a modal type such as Confirm.
      Modal options, with Confirm modal highlighted.
    3. Configure the modals as shown in the table.

      Configure each modal differently, depending on what the modal requires. Change what information goes into the modal, the size of the modal, and how it looks. You can add an event handler to the modal that performs the action for the modal, such as opening or closing the modal.

  5. Add a component to your page to trigger the modal you just added, such as a button component.
    See Add and configure components for more information.
  6. Select the Events tab in the configuration panel.
  7. Select + Add event handler.
    Arrow pointing to the add event handler option for the button component.
  8. Select Open or close modal dialog.
  9. Select the modal you created in the previous steps using the Modal drop-down.
  10. Click Add.
    Event handler configuration screen showing the open or close modal dialog settings.
  11. When you finish configuring the modal, close it.

    Notice in the content tree that the modals you create sit above the body of your page structure.

    Content tree with modals listed.
  12. Click Save.