Skip to content

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

Eastern Standard TimePacific Standard Time

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.

An unhandled error has occurred. Reload 🗙

    Rejoining the server...

    Rejoin failed... trying again in seconds.

    Failed to rejoin.
    Please retry or reload the page.

    The session has been paused by the server.

    Failed to resume the session.
    Please reload the page.