Alert modal setup

task brazil Updated Sep 10, 2026 2 min read alert-modal-uib-setup.md
Raw file servicenow.com

The Alert modal provides information relating to a component action and a button to close the modal. For example, an alert modal can advise a user who has selected a delete action that the action can't be undone.

Before you begin

This task assumes you have placed a component on the page and are ready to select and configure a modal for that component.

Role required: admin

Procedure

  1. In the UI Builder content pane, select the component from which the modal will open.

  2. Add a modal to the component.

    For instructions, see Add modal to component.

  3. Select the Alert modal type from the panel that appears.

    [Omitted image "select-alert-modal.png"] Alt text: Modal selection panel with the Alert modal selected

    The template for the Alert modal appears on the canvas.

    [Omitted image "alert-modal-template.png"] Alt text: Shows the template that appears when configuring the Alert modal

Parent Topic:UIB Setup Information

Alert modal properties

Using the modal template for reference, configure the properties that define the message and control the behavior of the Alert modal.

To configure the properties, enter either static or dynamic input. Enter dynamic input by selecting the input type.

Label [property]

Description

Header[headerLabel]

The modal title.

Content[content]

Message text to display in the modal.

Button label[buttonTitle]

Label describing the action of the button in the modal footer.

Modal size[size]

Size of the modal. The options are:- Small

  • Medium (default)
  • Large
  • Fullscreen

Prevent Default Button Action[preventDefaultAction]

Prevents the default behavior of the button from closing the modal.Default: false

Defer modal content loading[defer]

When set to false, connects the modal content when the page loads.Default: true

## Alert modal events

Select event handlers to configure the events provided with the Alert modal.

The Events tab shows the events used by the modal. To view the available events, select + Add event mapping. Select the event in the list to add one or more event handlers.

Event handlers

Event handlers work with data resources to link the modal actions to the data you want to display to your users. Select the event in the list to add one or more event handlers.

For instructions on adding event handlers to an event, see Configure an event handler.

Event descriptions

Event

Description

Modal closed

The user closes the modal.The payload contains modalId, the ID of the modal being closed.

Modal opened

The user opens the modal.The payload contains modalId, the ID of the modal being opened.

Search documentation
Search document titles and file paths on the brazil branch