Skip to main content
In Prophecy, the dialog() function defines the visual configuration interface for your gem. This is what users see and interact with when setting up or editing a gem in the UI. To build an effective dialog, you’ll use layout containers, UI controls (like checkboxes, text boxes, expression editors), and bindings to connect UI elements to your gem’s configuration. All of these elements are imported into your custom gem from uispec.py. By examining uispec.py, you can:
  • Discover the full library of UI elements.
  • Understand what each component does and what methods it supports.
  • See how to configure visual behavior, bind properties, add hints/tooltips, and more.
To see an example dialog() function, visit Gem Builder reference.
To reference the complete code of a certain gem, search for the gem using the left sidebar of the project editor. Click the gem to open its code, then look for the dialog() function. This function contains the code that determines how UI components are configured.

Atoms

Atoms are basic UI components defined in uispec.py that you can use in the gem dialog configuration. Below are the most commonly used atoms, with example code and images for reference.

Checkbox

Boolean checkbox element that a user can select or unselect.
Checkbox

Switch

Boolean toggle that a user can enable or disable.
Switch

TextBox

Allows the user to type a single line of input.
TextBox

ExpressionBox

Input for code expressions.
ExpressionBox

ExpTable

Dynamic table with target and expression columns.
ExpTable

BasicTable

Configurable table with editable cells and optional footers.
BasicTable

TitleElement

Static heading element, rendered as title text with optional heading level.
TitleElement

TextArea

Multi-line text input area for longer descriptions.
TextArea

SchemaTable

Information about the dataset schema, including column names, data type, and metadata.
SchemaTable

Ports

Component for displaying and editing gem input or output ports.
Ports

SchemaColumnsDropdown

Dropdown that lets the user select columns defined in the dataset schema.
SchemaColumnsDropdown

SelectBox

Dropdown menu with search and other configuration options.
SelectBox

AlertBox

Message box for alerts/info/warnings.
AlertBox


NumberBox

Allows the user to input an integer. Does not support floats.
NumberBox

Markdown

Displays static Markdown-formatted content.
Markdown

RadioGroup

A group of radio buttons that can have labels, values, icons, and descriptions.
RadioGroup

Editor

Code editor with expression builder support and schema suggestions.
Editor

Layout

The layout components let you organize your gems with columns, tabs, and more.

StackLayout

This arranges its child elements in a vertical stack to place elements one below the other.

ColumnLayout

This component arranges its child elements in horizontal columns, allowing for a side-by-side layout.

FieldPicker

This is a form-like component that contains labeled input fields. Each field you add calls a new form control (like text box, checkbox, select box) associated with a specific property.

Explore uispec.py