Skip to main content

Gallery Input

Type: gallery-input

Image-card gallery input with horizontal, vertical, or grid layout and SQL or static options.

Supports children: No

An image-card gallery input with horizontal, vertical, or grid layout that syncs with canvas parameters. Prefer sql (DuckDB query with {{udf_name}} placeholders returning value, title, and image columns) for dynamic options from UDF DataFrames. Fall back to options array for static choices.

Example — SQL

{
"type": "gallery-input",
"props": {
"label": "Select a dataset",
"param": "dataset",
"sql": "SELECT id AS value, name AS title, thumbnail AS image FROM {{datasets}}"
}
}

Example — static options

{
"type": "gallery-input",
"props": {
"label": "Select style",
"param": "map_style",
"options": [
{ "value": "dark", "title": "Dark", "image": "https://example.com/dark.png" },
{ "value": "light", "title": "Light", "image": "https://example.com/light.png" }
]
}
}

Every widget is defined as { "type": "gallery-input", "props": { ... } }. The properties below describe the props object.

Props

Loading ....

Raw schema

Download the full schema file: /widget-schema/gallery-input.json