select
Dropdown single-select. Supports plain options, legacy `map` configs, and `tokenGroup` binding to theme.json tokens.
Stored value
string for plain options OR a full token object (`{ key, slug, value, cssVar }`) when bound to a `tokenGroup`
Supports
- Plain `{ value, label }` option lists
- Legacy `map` configs (key/value pairs that map keys to richer values)
- `tokenGroup` binding — options come from a theme.json token group
- Optional `tokenKeys` filter to narrow a token group to specific keys
- Auto-prepended placeholder option when no `defaultOptionKey` is set
Config options
options{ value, label }[]- The choices for plain-list mode.
mapobject | array- Legacy form. Key/value pairs mapping option keys to richer values.
tokenGroupstring- Bind to a theme.json token group (e.g. `"color"`, `"font-size"`). Stored value becomes the full token object.
tokenKeysstring[]- When `tokenGroup` is set, restrict to these token keys only.
defaultOptionKeystring- Initial value if the field is empty.
placeholderstring- Label for the auto-prepended empty option.
Example
json
{ "id": "ctrl_size",
"type": "select",
"label": "Size",
"attributeKey": "size",
"default": "m",
"options": [
{ "value": "s", "label": "Small" },
{ "value": "m", "label": "Medium" },
{ "value": "l", "label": "Large" }
],
"parentPanelId": "panel" }
Gotchas
Heads up
Stored shape depends on config: plain options store the string value, `tokenGroup` stores `{ key, slug, value, cssVar }`. Branch on type when reading.
Heads up
For multi-select use `checkbox-group` (vertical) or `button-group` (horizontal).