# dialog/checklist Open a multi-selection list dialog. ## Syntax
[dialog/checklist "Title" $items ?checked-indices]
## Parameters - `"Title"` — dialog title (defaults to `"Select"`) - `$items` — vector of strings to choose from - `?checked-indices` — optional vector of 0-based indices to pre-check ## Examples
[dialog/checklist "Toppings" @{"olives" "onions" "pepper"}]
[dialog/checklist "Toppings" @{"olives" "onions"} @{0 2}]
[dialog/checklist %{ :title "Toppings" :items @{"a" "b"} :checked @{1} }]
[dialog/checklist :toppings "Toppings" $items]     # explicit id → :data~id :toppings
## 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 selected item texts joined by newline (empty when cancelled). - `deft` scripting binary — blocks on stdin, returns the joined string. ## See Also `dialog/menu`, `dialog/confirm`, `dialog/prompt`