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.

NameTypeDescriptionactionIconIconKey

The icon associated with the action button

actionIconPosition'right' | 'left'

Changes the position of the action button icon

actionPaddingboolean

Style the action button with or without padding

actionPosition'bottom' | 'right'

Changes the position of the action button

actionTextstring

The text displayed on the action button of the alert

closeIconIconKey

The icon in charge of closing or hiding the full alert

closeIconPosition'top' | 'center'

Changes the position of the close icon

descriptionstring

The description of the alert

hiddenboolean

Whether the component is visible.

iconIconKey

The icon displayed on the left of the alert

iconPosition'center' | 'top'

Changes the position of the alert icon

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.

titlestring

The title or header of the alert

type'info' | 'warning' | 'success' | 'error'

The different styling types for the alert component

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.

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.