Customize UI Builder pages using components
Summarize
Summary of Customize UI Builder pages using components
UI Builder enables you to create and customize pages for workspaces and portals by adding and configuring components. Components are the fundamental building blocks, ranging from simple elements like buttons and labels to complex components like lists, forms, modals, and viewports. This flexibility allows you to tailor user experiences to meet specific business needs within ServiceNow.
Show less
Adding Components
You can add components to UI Builder pages through multiple methods:
- Using the add content (plus) icon and selecting from the Components tab.
- Adding components before or after existing components via icons or the floating menu.
- Adding components directly from the Content tree.
Pages are structured using column layouts, where components are placed within columns. You can have multiple column layouts per page with up to six columns each, allowing flexible page design.
Configuring Components
The configuration panel offers three key ways to customize components:
- Component Properties: Properties vary by component complexity. Simple components require minimal configuration, while complex ones like lists and forms need more detailed setup. Properties can be static, dynamically data-bound, or scripted using JavaScript.
- Styles Tab: Customize CSS styles such as colors, fonts, and borders to change component appearance.
- Events Tab: Manage event mappings at page and variant levels, including dispatched and handled events.
The component formula editor allows for binding or modifying properties using text, data bindings, and formulas with support for logical, arithmetic, and functional operations.
Important Features
- Component Presets: Quickly apply predefined configurations to compatible components based on UI Builder page templates.
- Component ID: Each component has a unique ID for referencing in scripts or data bindings, which can be customized.
- Component Visibility: Control visibility based on component properties, dynamic data, or scripts, independent of user roles.
- Duplicate Components: Easily create exact copies of configured components to reuse on the same page.
Advanced UI Elements
UI Builder supports additional complex UI constructs, including:
- Page Collections: Groups of pages reusable across multiple experiences.
- Tabbed Content: Using the Tabs component to organize content efficiently.
- Contextual Sidebar: Display related content in vertical tabs.
- Forms: Embed one or more forms on pages.
- Modals and Popovers: Provide alerts, calls to action, or contextual information.
- Modeless Dialogs: Floating windows that allow interaction with both dialog and underlying page content.
- Viewport Components: Extend experiences by embedding components or tabs without owning the parent page.
Practical Tips
- Reload the stage view to see configuration changes without saving by using Developer > Reload Stage.
- Save frequently to preserve your work.
- Use the Content tree to view and manage page structure efficiently.
- UI Builder admins can manage which component properties are visible based on UI policies, enhancing governance and user experience.
Learn what a component is in UI Builder. Also, see how components work within UI Builder.
Components are the base elements of your UI Builder page. Components range from core elements like buttons and labels to more complex experience components like lists and forms.
You can add these components to your UI Builder page to build or customize your workspace or portal experience. For example, adding an Activity stream component to your page that lets users see their travel request activity.
You can add components to your UI Builder page in the following ways.
| Location | Example |
|---|---|
| Directly from a page in UI Builder (option 1) | Select the add content (plus) icon, select the Components tab, and then select a component. |
| Directly from a page in UI Builder (option 2) | On a column layout or component, select the add before (plus) or add after (plus) icon, and then select a component. |
| From the Content tree in UI Builder | In the content tree, select + Add content and then select a component. |
| From the floating menu above the page in UI Builder | On a column layout or component, select the Menu icon, select Add before or Add after, and then select a component. |
Column layouts in UI Builder
Add column layouts and columns to your UI Builder page first. Then add components to the columns in a column layout to build and customize your page. Think of a column layout as a defined part of the screen where you add components like lists and headings. You can have as many column layouts on a UI Builder page as you want, with as many as six columns in any column layout. Multiple components can be added to a single column. View the structure of your page in the Content tree.
For more information, see Column layouts.
Configure components in UI Builder
- Configure the component properties.
- Add CSS style overrides.
- Set up event handlers for the components.
- Configure tab
- Component properties vary based on each component. Component configuration can be simple, as is the case with simple elements like buttons, headings, and labels. Components like lists and forms require significant configuration. For icon and image components, select from a variety of options or use a custom icon or image. You can modify component properties with UI Builder's low-code JSON editor. For more information about configuring components, see Next Experience Components.
- Styles tab
- You can change the Cascading Style Sheets (CSS) styles for individual components. Change color borders, font size, and so on.
- Events tab
- Configure page-level and variant-level event mappings. Also add dispatched events and handled events for your variant. The more complex, experience components rely heavily on dynamic data that is provided by a data resource. Binding dynamic data to a component is an important feature. You dynamically expose data from tables, records, or other elements on your page. Exposing data enables you to reuse your components. Also, you can point to the configuration fields to see icons data or scripting options for each field.
As you add and configure components on the page, the stage shows your work. If you make changes and the updates do not load on the stage, select the Open menu icon and then select Developer > Reload Stage. Reloading the stage shows your changes, but does not save them. To save your work, select Save at the top right.
Component Presets in UI Builder
Use component presets to automatically configure components on compatible pages. UI Builder page templates contain controllers that presets use to define component configuration values. For more information, see Automatically configure components using presets.
Component properties sections
Component properties are grouped into sections of similar properties. Open and close sections by selecting the arrows to the right of the property headings. UI Builder admins can select which component configuration properties are displayed or hidden based on UI policies.
Component formula editor
Use the UI Builder component formula editor in the configuration panel to bind or modify formulas. You can enter text, data bindings, and/or formulas. Formulas can consist of any combination of the three input types. The component formula editor supports logical, arithmetic, comparison, negation, and functional transform types.
Each function added to the component formula editor auto-completes. The component formula editor displays a label for each input of the function so you know what parameters each function requires. For more information about the supported functions in the component formula editor, see Supported functions in the UI Builder component formula editor.
Component ID
Use the component ID when you add a script or bind data to the component as a way to reference the component. A component ID is automatically created and is based on the component label when you add a component to a page. You can change the component ID to anything you want, as long as it is unique. Select the name of the component in the configuration panel to see the component ID.
Component visibility
Select the eye icon in the configuration panel to set component visibility. Component visibility is based on a property of the component itself, not who is viewing it. You could show or hide a component based on conditions. For example, hiding an image if it has a broken link.
You can set the visibility based on dynamic data binding, or by editing a scripted property value.
Set the Test value to test what happens when the visibility is set to true, false, or none.
Duplicate components
Create an exact copy of a configured component on your UI Builder page except for the name and ID. A duplicated component copies all properties, bindings, and events. For more information, see Duplicate a component.