Image Grid

An grid of images sourced from multiple URLs. Each image supports caption text, and a tooltip.

Properties

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

NameTypeDescriptionaspectRationumber | null

The aspect ratio with which to display images.

captionByIndexstring[]

A list of captions for each item, by index.

clickableByIndexboolean[]

A list of boolean values for each item, by index, that reflect whether they have an enabled Click event handler.

columnCountnumber

The number of grid columns to display.

columnMinWidthnumber

The minimum column width if columnType is responsive.

columnType'fixed' | 'responsive'

Whether grid columns render with a fixed or responsive width.

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

The source data for the component.

hiddenboolean

Whether the component is visible.

hiddenByIndexboolean[]

A list of boolean values for each item, by index, that reflect whether they are hidden.

itemMode'dynamic' | 'static'

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

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.

srcByIndexstring[]

A list of source URLs for each item, by index.

tooltipByIndexstring[]

A list of tooltips for each item, by index.

Events

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

NameDescriptionClick

A user clicks an image

Methods

Methods for interacting with Image Grid. 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.