Field type
select
Dropdown single-select. Supports plain options, legacy map configs, and tokenGroup binding to theme.json tokens.
Type: select · Stored attribute type: string
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
mapconfigs (key/value pairs that map keys to richer values) tokenGroupbinding — options come from a theme.json token group- Optional
tokenKeysfilter to narrow a token group to specific keys - Auto-prepended placeholder option when no
defaultOptionKeyis set
Config options
| Option | Type | Default | Description |
|---|---|---|---|
options | { value, label }[] | The choices for plain-list mode. | |
map | object | array | Legacy form. Key/value pairs mapping option keys to richer values. | |
tokenGroup | string | Bind to a theme.json token group (e.g. "color", "font-size"). Stored value becomes the full token object. | |
tokenKeys | string[] | When tokenGroup is set, restrict to these token keys only. | |
defaultOptionKey | string | Initial value if the field is empty. | |
placeholder | string | Label for the auto-prepended empty option. |
Gotchas
- Stored shape depends on config: plain options store the string value,
tokenGroupstores{ key, slug, value, cssVar }. Branch on type when reading. - For multi-select use
checkbox-group(vertical) orbutton-group(horizontal).
Example
{ "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" }Every field also takes the keys common to all fields.