Modeless dialog component setup

task brazil Updated Sep 10, 2026 5 min read modeless-dialog-component-setup.md
Raw file servicenow.com

The Modeless dialog component is a window,  when triggered by a user, appears as an overlay. It enables users to interact with both the main content and window content.

Before you begin

This task assumes you have placed the component on the page and are ready to configure the properties and events. For instructions on accessing and using features in UI Builder, see Customize UI Builder pages using components.

Note: This document describes the latest component functionality. Go to the store to make sure you have the latest version of the component.

Role required: admin or ui_builder_admin

Procedure

  1. Define a label for Modeless dialog that differentiates it from other components in the content tree.

    A descriptive label makes finding the component easier in a large list of components. For instructions on using the content tree, see Manage UI pages and page variants.

  2. Select the Modeless dialog component using one of these methods:

    • Click anywhere within the component on the page.
    • Select the label you created for your component in the content tree. The configuration options appear in the panel on the right.

Parent Topic:UIB Setup Information

Modeless dialog component properties

The Modeless dialog component is a window that appears as an overlay when triggered by a user. It enables users to interact with both the main content and  window content.

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

Label [property]

Description

Variant [variant]

Sets the header content styles. Choices are:

  • initial
  • primary
  • secondary

Default: initial.

Size [size]

Sets the header content size. Choices are:

  • small
  • medium

Default: medium.

Width [width]

Initial width of the dialog in pixels. Default: 380.

Height [height]

Initial height of the dialog in pixels. Default: 600.

Position [position]

The position of the dialog, on the page, when triggered. Choices available are:

  • unset
  • top-left
  • top-right
  • centered
  • bottom-right
  • bottom-left

Default: unset, the dialog goes back to center position with respect to the page.

Offset [offset]

Number of pixels to shift the dialog toward the center of the screen. The first value is the horizontal offset. The second value is the vertical offset. Each value must be zero (0) or above. You can use this property when the Position property is set to top-left, top-right, bottom-left, or bottom-right.Default: [0,0].

Opened [opened]

Determines whether the dialog is open by default. To have the dialog open, set to true.Default: false.

Fit content [fitContent]

To have the size of the dialog automatically adjust based on its content, set to true.Default: false.

Enable drag[enableDrag]

To enable the user to drag the dialog, set to true. User can drag the dialog by grabbing the header or footer area (if available). Default: false.

Show close [canClose]

To enable the close button, set to true. Default: false.

Show minimize[canMinimize]

To enable the minimize button, set to true. Default: false.

Show maximize [canMaximize]

To enable the maximize button, set to true. Default: false.

Heading [headingLabel]

Heading label (title) for the dialog. Overwrites the default heading slot.

Heading icon [headingIcon]

Icon that appears next to the dialog Heading label.

Resizable config[resizableConfig]

Whether the modeless dialog dynamically resizes as a user types beyond the size of the dialog, along with the ability to set the resizable minimum and maximum heights. When set to false, the modeless dialog doesn't dynamically resize.Default: true.

## Modeless dialog component events

If you have chosen a preset containing events, data handlers for those events are pre-selected by the controller and no manual configuration is required. If the component has events that aren't included in the preset, you must add data handlers manually to configure those events.

The Events tab shows the events used by the Modeless dialog component. Events with presets are marked with the Preset badge. To show events that don't have preset configurations, select + Add event mapping. If the component has only one event and that event doesn't have a preset, the event is displayed and is ready for configuration.

Event handlers

Event handlers work with data resources to link the Modeless dialog 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 instruction on how to add and delete event handlers with presets and how to disable an event, see Configure an event handler and Disable preset event mappings.

[Omitted image "modeless-dialog-presets.png"] Alt text: Modeless dialog default events tab showing preset events

Preset events

  • Modeless dialog

    This preset provides data handlers for these events:

    • Modeless dialog close
    • Modeless dialog minimize

Event descriptions

Event Description
Modeless dialog opened set When Opened [opened] property is set to true, triggered when the modeless dialog is opened.
Modeless dialog mousedown Triggers when user selects header or footer (if shown).
Modeless dialog close When close button is enabled (Show close [canClose] property is set to true) and user selects it, the dialog closes. Also, sets the Opened [opened] property to false.
Modeless dialog minimize Triggers when the minimized button is enabled (Show minimize [canMinimize] property is set to true) and user selects it.
Modeless dialog maximize Triggers when maximize button is enabled Show maximize [canMaximize] and user clicks it, makes the dialog height and width 100% – relative to the container.
Modeless dialog mouseup Triggered when header or footer are shown and user releases mouse pointer from dragging while drag is enabled.
Modeless dialog content visible Triggers when modeless dialog opens and renders the content.
Search documentation
Search document titles and file paths on the brazil branch