Button stateful component setup

task brazil Updated Sep 10, 2026 3 min read button-stateful-component-uib-setup.md
Raw file servicenow.com

The Button stateful component contains an actionable icon that can switch between ON and OFF states. This button can't display other elements, such as labels.

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 your Button stateful that differentiates it from other components in the content tree.

    For more information, see Manage UI pages and page variants.

    A 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.

    [Omitted image "button-stateful-config-content-tree.png"] Alt text: Button stateful component in the content tree

  2. Select the Button stateful component, using one of these methods:

    • Click anywhere within the component.
    • Select the Button stateful label you created for your component in the content tree. The property fields appear in the Config tab in the setup panel on the right.

Parent Topic:UIB Setup Information

Button stateful component properties

Configure the appearance and features of the Button stateful component.

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

Field Property Description
Icon icon Icon to display inside the button.
Selected selected Selection state of the button.
Variant variant Button style, including color and interaction behavior.
Size size Button size.
Config role configRole Type of stateful element to display such as button, radio, or tab.
Disabled disabled Option to mute the button color and prevent user interactions.
Padding hidePadding Option to show or hide button padding. Hiding padding reduces the button height so that the button only takes up the height required by its label and icons.
High contrast highContrast Option to display variant colors that have higher contrast. Use this property when displaying components on darker backgrounds.
Tooltip text tooltipContent Text displayed in a tooltip when the user hovers over the button.
ARIA properties configAria Object to set the ARIA properties for the specified HTML element within the button. The value of each key is an object that contains an ARIA property (or properties) and corresponding values. These ARIA properties are set on a specified element.

Button stateful component events

Select event handlers to configure the actions (events) provided with the Button stateful component.

The Events tab shows the events used by the Button stateful component. 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 Button stateful 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 Description
Button stateful selected set Dispatched when the user toggles the selected status of the button.
Search documentation
Search document titles and file paths on the brazil branch