Select

A real select underneath, with SutraUI's own list on top: forms, validation and first paint work without JavaScript.

The server renders a real <select> with the options. The extracted hook hides it and shows a trigger and a list drawn as page markup, so the open list also appears in a screen share. Below 640 px the list is a bottom sheet.
Options and a prompt

In a form, with errors

<.input type="select"> renders the select with its label, description and errors. Errors appear once a field is used ( used_input? ), and aria-invalid goes to the trigger.

Form with validation

What they can do in the workbook.

searchable defaults to nil : a search box appears from 10 options on. Force it with true or false . Letters type-ahead on the field; in the search box they filter.

Searchable (20 options)

Groups and disabled options

Groups

Multiple

multiple shows chips in the trigger and keeps the list open while choosing. A multiple select with nothing chosen posts nothing for its field (the browser's rule), so default it in the handler.

Multiple

Native

native keeps only the browser's own select, for a page that must work without JavaScript.

Native

Inside a dialog

The open list is a fixed card placed from the trigger, so a dialog body no longer clips it.

In a dialog

Custom option content

For options that need markup (a badge, an icon) build the list with select_option . That form keeps a hidden <input> instead of a <select> . Prefer options wherever the options are plain text.

Custom options

Usage Notes

  • WAI-ARIA select-only combobox (editable with search) and listbox. Arrows, Home/End, PageUp/PageDown, type-ahead, Enter/Space, Tab and Escape all work.
  • The list flips above the field or shifts to stay on screen and scrolls inside the room it has.
  • Merge phoenix-colocated/sutra_ui into your LiveSocket so the styled list shows; without it the browser's own select works.

Are you sure?