Combobox
Searchable dropdown that lets the user filter and pick a single value; requires PopoverProvider in layout.
WAI-ARIA Compliant*
Installation
Add the Combobox component using the CLI:
shadcnblazor component add combobox
Features
Real-time text filtering as you type
Controlled (
@bind-Value, ValueChanged)Two option modes:
Items or declarative childrenKeyboard navigation (arrows, Enter, Escape, Tab)
ARIA-compliant combobox/listbox semantics (
aria-autocomplete="list")Disabled support (trigger + per-item)
"No results" empty state
Placeholder + selected-value display
Examples
Usage
The Combobox is a searchable single-select dropdown. Type to filter the list in real time. Use @bind-Value for two-way binding. Provide options via Items or declarative children. Requires PopoverProvider in your layout.
Selected: none
Declarative
Use SelectItem, SelectLabel, SelectSeparator, and SelectGroup as child content for inline option declaration. When search text is active, labels and separators are hidden so the filtered results are clean.
Selected: none
API Reference
Combobox`1
Searchable dropdown that lets the user filter and pick a single value.
Properties
| Name | Type | Description |
|---|---|---|
AdditionalAttributes |
Dictionary<string, Object> |
|
ChildContent |
RenderFragment |
|
Class |
string |
|
Disabled |
bool |
|
Items |
IEnumerable<SelectOption<T>> |
|
Label |
string |
Optional label shown at the top of the dropdown and used as the trigger aria-label. |
LockScroll |
bool |
When true, body scroll is locked while the popover is open. |
MaxVisibleItems |
Nullable<int> |
|
Placeholder |
string |
Placeholder text shown when no value is selected. |
PopoverFitContent |
bool |
When true, the popover expands to fit option content instead of matching trigger width. |
RenderItem |
RenderFragment<SelectOption<T>> |
|
Size |
Size |
Size variant applied to the trigger input. |
TriggerClass |
string |
Additional CSS classes applied to the trigger input element. |
Value |
T |
Currently selected value. |
ValueChanged |
EventCallback<T> |
Callback invoked when the selected value changes. |
Events
| Name | Type | Description |
|---|---|---|
ValueChanged |
EventCallback<T> |
Callback invoked when the selected value changes. |
Methods
| Method | Returns | Description |
|---|---|---|
DisposeAsync |
ValueTask |
|
Equals |
bool |
|
GetHashCode |
int |
|
GetType |
Type |
|
SetParametersAsync |
Task |
|
ToString |
string |
Mobile support for API reference coming soon.