Skip to main content

Dropdown

Type: dropdown

Select dropdown with SQL or static options.

Supports children: No

A dropdown that syncs with canvas parameters. Prefer sql (a DuckDB query with {{udf_name}} placeholders returning value and label columns) for dynamic options from UDF DataFrames. Fall back to the options array for static choices.

Example — SQL (dynamic)

{
"type": "dropdown",
"props": {
"label": "Select City",
"param": "city",
"sql": "SELECT DISTINCT city AS value, city AS label FROM {{my_udf}} ORDER BY city"
}
}

Example — static options

{
"type": "dropdown",
"props": {
"label": "Select Country",
"param": "country",
"options": [
{ "value": "us", "label": "United States" },
{ "value": "uk", "label": "United Kingdom" }
]
}
}

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

Props

Loading ....

Raw schema

Download the full schema file: /widget-schema/dropdown.json