Alert

An alert component to display information

Properties

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

NameTypeDescriptionvaluestring

The current state selected for the alert (value field of a state)

closeIconIconKey

The icon in charge of closing or hiding the full alert

closeIconPosition'top' | 'center'

Changes the position of the close icon

heightType'auto' | 'fixed' | 'fill'

Height type of the Alert

hiddenboolean

Whether the component is visible.

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.

showInEditorboolean

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

Events

Events are triggered by user interactions with Alert. Use event handling to trigger queries or other actions in response to events.

NameDescriptionClick

A user clicks the component.

Close

A user closes the component.

Methods

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

NameDescriptionsetValue(value: boolean | string | number | void)

Set the current value.

clearValue()

Clear the current value.

scrollIntoView(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.