Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

UI Page API - ServiceNow Fluent

The UI Page API defines custom user interface (UI) pages [sys_ui_page] that display forms, dialogs, lists, and other UI components.

Note: For the latest ServiceNow Fluent API documentation and examples, see the ServiceNow Fluent API reference and ServiceNow SDK examples repository on GitHub.

A UI page displays as a web page and can be added to a widget for use in dashboards. For general information about UI pages, see UI pages.

You can develop a simple React application with the UI Page API. In the src/client directory, add static content files that define the HTML, client script, and styling of the page. From the UiPage object, refer to the page's HTML entry point (index.html). For more information, see User interface development with React.

Parent Topic:ServiceNow Fluent API reference

Related topics

ServiceNow Fluent

UiPage object

Create a UI page [sys_ui_page] for a custom user interface.

NameTypeDescription
$idString or NumberRequired. A unique ID for the metadata object. When you build the application, this ID is hashed into a unique sys\_id. For more information, see ServiceNow Fluent language constructs.Format: `Now.ID['String' or Number]`
endpointStringRequired. The endpoint to access the web page. The endpoint value can't contain spaces.Format: `_.do`
descriptionStringA description of the user interface and its purpose.
directBooleanFlag that indicates whether to omit the standard HTML, CSS, and JavaScript for a UI page. For React UI pages, set this property to `true`.Valid values: - true: Omit the standard HTML, CSS, and JavaScript and provide custom CSS and JavaScript for the page. - false: Include the standard HTML, CSS, and JavaScript. Default: false
htmlString

The body HTML code that defines what is rendered when the page is shown. It can contain either static XHTML, dynamically generated content defined as Jelly, or call script includes and UI Macros. This property supports an alias to import an index.html file for React development, a reference to another file in the application that contains HTML, or inline JavaScript.Note: With React development and imported HTML, the html property of the UiPage object supports only one-way synchronization. After defining the HTML of a UI page in source code, if the HTML is modified outside of the source code, those changes aren't synchronized and reflected in the source code.

Format:

  • An alias to import the index.html file from the previous build for UI development with React. The alias can be any value and must also be imported in the now.ts file that contains the UiPage object: import <alias> from 'path/to/index.html'.
  • To use text content from another file, refer to a file in the application using the following format: Now.include('path/to/file'). For more information, see ServiceNow Fluent language constructs.
  • To provide inline HTML, use string literals or template literals for multiple lines of code: 'HTML' orHTML``.
categoryStringThe type of UI page.Valid values: - general: The page is general purpose. - homepages: The page is used as a home page. - htmleditor: The page is used to insert HTML content. - kb: The page is used with a Knowledge Base. - cms: The page is used with the Content Management System \(CMS\). - catalog: The page is used with Service Catalog.
clientScriptScriptA script that runs in the browser, such as functions called by buttons. This script handles any required client-side processing needed, like setting focus to a field or other interactive DHTML features after a page is loaded. This property supports inline JavaScript or a reference to another file in the application that contains a script.Client scripts for the UI page are deployed to the browser within a `

sndocs is an independent community mirror and is not affiliated with or endorsed by ServiceNow.

ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the United States and/or other countries. Other company and product names may be trademarks of the respective companies with which they are associated.

© 2026 ServiceNow, Inc. All rights reserved.

Documentation content is redistributed under the Apache License 2.0 from the ServiceNowDocs repository.