# dialog/menu
Open a single-selection list dialog.
## Syntax
[dialog/menu "Title" $items ?default-index]
## Parameters
- `"Title"` — dialog title (defaults to `"Select"`)
- `$items` — vector of strings to choose from
- `?default-index` — optional 0-based index of the highlighted item
## Examples
[dialog/menu "Pick" @{"small" "medium" "large"}] [dialog/menu "Flavor" @{"vanilla" "choco"} 1] [dialog/menu %{ :title "Pick" :items @{"a" "b" "c"} }] [dialog/menu :pick-color "Flavor" ] # explicit id → :data~id :pick-color
## Returns
In TUI hosts the call returns immediately — `true` when an explicit id was given (leading keyword or `:id` in the spec map), else the numeric request-id. Behavior depends on the build:
- TUI (`retro`, `retra`) — returns immediately; the result arrives
later as a `:message` event with topic `"dialog-result"` and a structured
`:data` map `%{ :id :value :cancelled }` where `:value` carries the selected item text (empty when cancelled).
- `deft` scripting binary — blocks on stdin, returns the selected item.
## See Also
`dialog/checklist`, `dialog/confirm`, `dialog/prompt`