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.

Switch

Boolean toggle that a user can enable or disable.

TextBox

Allows the user to type a single line of input.

ExpressionBox

Input for code expressions.

ExpTable

Dynamic table with target and expression columns.

BasicTable

Configurable table with editable cells and optional footers.

TitleElement

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

TextArea

Multi-line text input area for longer descriptions.

SchemaTable

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

Ports

Component for displaying and editing gem input or output ports.

SchemaColumnsDropdown

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

SelectBox

Dropdown menu with search and other configuration options.

AlertBox

Message box for alerts/info/warnings.


NumberBox

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

Markdown

Displays static Markdown-formatted content.

RadioGroup

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

Editor

Code editor with expression builder support and schema suggestions.

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