Picker
A scrollable selection for long option lists. Stores a .string value.
Type
"picker"
Relevant Fields
Inherits all Control Definition. Key fields:
| Field | Type | Default | Description |
|---|---|---|---|
options |
string[] | required | Available choices |
pickerStyle |
string | "menu" |
"menu", "wheel", "inline" |
label |
string | — | Display label |
tint |
string | "#667eea" |
Accent color |
defaultValue |
string | — | Initially selected option |
haptic |
string | "selection" |
Default haptic on change |
Styles
| Value | Description |
|---|---|
"menu" |
Dropdown menu (compact, default) |
"wheel" |
Spinning wheel picker |
"inline" |
Inline scrollable list |
Examples
Room selector (menu)
{
"type": "picker",
"id": "room-select",
"position": [0, 0],
"span": [1, 2],
"options": ["Living Room", "Bedroom", "Kitchen", "Bathroom", "Office", "Garage", "Patio"],
"defaultValue": "Living Room",
"label": "Room",
"action": { "method": "meshsocket", "mode": "request", "event": "switch_room", "payload": { "room": "{{value}}" } }
}
Playlist picker (wheel)
{
"type": "picker",
"id": "playlist",
"position": [0, 0],
"span": [2, 4],
"options": ["Chill", "Focus", "Workout", "Party", "Sleep", "Jazz", "Classical"],
"pickerStyle": "wheel",
"defaultValue": "Chill",
"label": "Playlist"
}
Notes
- For 2-5 options, prefer Segmented Control for better space efficiency
- Value is the string text of the selected option
Related
- Control Definition — Base fields
- Segmented Control — For shorter option lists
- Actions —
{{value}}substitution