Select Field
Select Field
The select field stores one value chosen from a controlled option list.
Best For
- visual variants
- alignment choices
- size options
- category-like controlled settings
Schema Example
{
"name": "theme",
"label": "Theme",
"type": "select",
"options": ["light", "dark", "accent"]
}Label/value style example:
{
"name": "alignment",
"label": "Alignment",
"type": "select",
"options": [
{ "label": "Left", "value": "left" },
{ "label": "Center", "value": "center" },
{ "label": "Right", "value": "right" }
]
}Template Usage
<section class="theme-{{ theme }}">
...
</section>Use It When
Use select when authors should choose one known option and the allowed values should stay controlled.
Do Not Use It When
Do not use select for:
- freeform text
- true/false toggles
- several repeatable rows
Use text, checkbox, or repeater instead.
Technical Notes
- keep option values stable after release because templates may depend on them
- use machine-friendly values and human-friendly labels
- avoid turning
selectinto a hidden content bucket with too many options - prefer
checkboxfor binary toggles andrepeaterfor row-based structures