Select
Use select as a trigger for a choice menu. Its content displays the current value; placeholder displays when it is empty. Handle on-press to open an anchored dropdown-menu containing menu-item options. Place the trigger and conditional menu in a stack. The model owns the open flag and clears it on selection or on-dismiss.
The selected option has a checkmark. Keyboard and pointer focus use a separate highlight, so moving through the menu does not change the committed value. For text entry with suggestions, see combobox.

Markup
Place the trigger and menu in a stack. Set anchor="below" and anchor-alignment="stretch" to align the menu below the trigger at the same width. Both pick_env and close_env_picker clear env_picker_open in update.
Enter, Space, or an arrow key activates the focused trigger. In the menu, Up/Down move through options from the selected item; Home/End move to the first or last. Enter or a click selects an option. Escape, Tab, or a click outside dispatches on-dismiss without changing the value. Focus returns to the trigger.
The core side is the open flag, the committed choice, and three arms:
Programmatic construction (Zig)
In a Zig view, the canvas.Ui builder constructs the same tree programmatically:
Attributes
| Attribute | Description |
|---|---|
text | Text value for text-bearing elements; a literal or one {binding}. |
placeholder | Hint text shown while a text entry is empty. |
disabled | Disables the control; true/false or a {binding}. |
on-press | Dispatch a Msg on press: tag or tag:{payload}. Legal on any element — a bound press handler makes it pressable, and presses on plain text/icons inside it fall through to it (dragging still selects text). |
on-dismiss | Dismissible surfaces only (dialog, drawer, sheet, dropdown-menu): Msg dispatched when Escape or a click outside dismisses the surface, so the MODEL owns the close (clear the open flag in update). The engine hides the surface immediately as an optimistic echo; the source tree wins on the next rebuild. |
