Select
Displays a list of options for the user to pick from, triggered by a button.
Selected: Banana
The overlay opens with a short fade, 95% zoom, and slide from the trigger side. Both edges expand evenly from a horizontally centered zoom origin. Closing fades and scales it down.
Examples
Short Form
Selected: Blueberry
Grouped Options
Selected: Eastern Standard Time
Multiple
Form validation
Submit with no selection to show the required message, then choose a fruit to clear it. Interactive selection marks the field as modified and runs field validation through the form's EditContext. Banana is disabled; arrow navigation skips it.
Static SSR behavior
The normal trigger, listbox, and item composition is progressively enhanced in true static server rendering. The browser owns opening, Floating UI positioning, keyboard navigation, typeahead, selection, outside/Escape dismissal, and focus return without a Blazor circuit.
Add name="field-name" to Select to emit browser-managed hidden inputs for native
form submission. Array selections emit one input per selected value. An optional form="form-id"
associates those inputs with a form elsewhere on the page.
For browser-only behavior, listen for the bubbling, cancelable shardui:select-change event.
Its detail includes instanceId, itemId, value, textValue,
selected, values, and multiple. Calling preventDefault()
cancels the selection.
@bind-Value and ValueChanged describe the initial server response but do not run
after a static response. Use an interactive render mode when selection must update Razor state,
validation, services, or server data. Closed options remain serialized as hidden and inert markup, so
they are not a secrecy or authorization boundary.