Lumeo

Select

Displays a dropdown list of options for the user to pick from.

Installation

dotnet add package Lumeo

One-time app setup (AddLumeo(), CSS & JS) is covered in the installation guide.

Usage

@using Lumeo

<Select />

When to Use

  • Choose one or more options from a predefined list of 5-15 items.
  • Replace native select elements with a styled, searchable dropdown.
  • Use multi-select mode for tagging, filtering, or assigning multiple values.

Selected: none

Selected: none

Selected: none

Keyboard Interactions

Key Action
EnterOpens the dropdown or selects the highlighted option.
SpaceOpens the dropdown when the trigger is focused.
ArrowDownMoves highlight to the next option.
ArrowUpMoves highlight to the previous option.
EscapeCloses the dropdown without changing the selection.
Type to searchFilters options when the searchable prop is enabled.

API Reference

Select

Property Type Default Description
Value string? null The currently selected value. Use with @bind-Value for two-way binding.
ValueChanged EventCallback<string> Callback invoked when the selected value changes.
Multiple bool false Enables multi-select mode. Selected items show as tags in the trigger.
Values List<string>? null The selected values in multi-select mode. Use with @bind-Values.
ValuesChanged EventCallback<List<string>?> Callback invoked when the selected values change in multi-select mode.
Open bool false Controls whether the dropdown is open.
OpenChanged EventCallback<bool> Callback invoked when the open state changes.
Searchable bool false Enables filtering options by typing in an inline search input.
Clearable bool false Shows a clear button to reset the selection.
Creatable bool false Allows creating new options from the search input.
OnCreate EventCallback<string> Callback invoked when a new item is created via the search input.
MaxDisplayTags int 3 Maximum number of tags shown in multi-select mode before showing "+N more".
Disabled bool false Disables the select and prevents user interaction.
IsLoading bool false Indicates a loading state, typically showing a spinner in the dropdown.
IsOpenboolfalseProgrammatic open state (alias for Open). Use with @bind-IsOpen.
IsOpenChangedEventCallback<bool>Fires when open state changes (alias for OpenChanged).
ItemsIEnumerable<TItem>?nullData source for auto-rendering items when using the generic data API (instead of SelectItem markup).
ItemValueFunc<TItem, string>?nullFunction that extracts the value string from a TItem when using Items.
ItemTextFunc<TItem, string>?nullFunction that extracts the display text from a TItem when using Items.
ItemGroupFunc<TItem, string?>?nullOptional function that groups items under labelled sections.
ItemDisabledFunc<TItem, bool>?nullOptional predicate that disables specific items.
ItemTemplateRenderFragment<TItem>?nullCustom template for rendering each item row.
VirtualizeboolfalseWhen true, virtualizes the item list for large data sets.
ItemSizefloat36Row height in pixels used by the virtualizer.
RequiredboolfalseMarks the field as required for form validation.
InvalidboolfalseApplies error styling to indicate a validation error.
ErrorTextstring?nullError message shown below when Invalid is true (standalone).
HelperTextstring?nullHelp text shown below when there is no error (standalone).
Labelstring?nullInline label rendered above the select (standalone).
Namestring?nullHTML name attribute for form identification.
Classstring?nullCustom CSS classes merged onto the Select's wrapper element.
Placeholderstring?nullConvenience placeholder shown by SelectTrigger when no value is selected — a top-level alternative to <SelectTrigger Placeholder="…">. The trigger's own Placeholder wins if both are set.
AdditionalAttributesDictionary<string, object>?nullUnmatched attributes are forwarded to the wrapper element.
FormFieldFormFieldContext?nullCascaded context from a parent FormField; drives validation state automatically.

SelectItem

Property Type Default Description
Value string "" The value this item represents when selected. Required.

SelectGroup / SelectLabel / SelectTrigger / SelectContent

Property Type Default Description
SelectLabel, SelectTrigger, and SelectContent accept only Class and AdditionalAttributes unless noted below. SelectGroup exposes the richer surface listed under "SelectGroup —" rows: wrap items under a labelled header, collapse them, and offer a single group-level checkbox in Multiple mode.
Placeholderstring?nullSelectTrigger — text shown when no value is selected.
Labelstring?nullSelectGroup — header text. When null/empty no header renders (still nests its items for layout / grouping semantics).
LabelClassstring?nullSelectGroup — extra classes on the group label, theming hook for the header.
CollapsibleboolfalseSelectGroup — clicking / Space / Enter on the header expands and collapses the group. An active search auto-expands collapsed groups so matches stay reachable.
DefaultExpandedbooltrueSelectGroup — initial expanded state for a Collapsible group.
GroupSelectboolfalseSelectGroup — in Multiple mode, renders a tri-state checkbox on the header that selects / deselects every descendant item (disabled items are skipped; when filtering, only visible matches).
  • Combobox — Use when the user needs to search and filter a large list of options.
  • RadioGroup — Better for small lists (2-5 items) where all options should be visible.
  • DropdownMenu — Use for action menus rather than value selection.