Status

A component that displays the status of a task or operation. It supports multiple user-defined states, including icons, colors, and labels.

Properties

Available properties for Status with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read information about components.

NameTypeDescriptionvaluestring

The current value.

colorByIndexcolor[]

A list of colors for each item, by index.

data{ [key: string]: unknown }[]

The source data for the component.

fallbackTooltipstring

The tooltip text to display for each item if there is no tooltip already set.

heightType'auto' | 'fixed'

Whether the height automatically resizes to fit content or is a fixed size.

hiddenboolean

Whether the component is visible.

horizontalAlign'left' | 'center' | 'right'

The horizontal alignment of the contents.

iconByIndexIconKey[]

A list of icons for each item, by index.

iconPosition'left' | 'right'

The position of the icon relative to the label.

itemMode'dynamic' | 'static'

The configuration mode for option lists. Either dynamic for mapped options or static for manual options.

labelsstring[]

A list of labels for each item. Falls back to the corresponding value if no label is provided.

maintainSpaceWhenHiddenboolean

Whether the component takes up space on the canvas if hidden is true.

marginstring

The amount of margin to render outside of the component.

selectedIndexnumber | null

The currently selected value, by index.

selectedItemobject | null

The currently selected item.

selectedLabelstring

The label of the currently selected value, by index.

showInEditorboolean

Whether the component remains visible in the editor if hidden is true.

tooltipByIndexstring[]

A list of tooltips for each item, by index.

valuesstring[]

A list of possible values.

verticalAlign'top' | 'center' | 'bottom'

The vertical alignment of the contents.

Methods

Methods for interacting with Status. You can write JavaScript almost anywhere in Retool and use methods to manipulate data or components.

NameDescriptionscrollIntoView(options: any)

Scrolls the canvas or parent container so that the selected component appears in the visible area.

setHidden(hidden: boolean)

Set the hidden value to toggle whether the component is visible. Defaults to true without a parameter.

resetValue()

Reset value to the default value.

setValue(value: string)

Set the current value.