Components / Combobox

Combobox

Value-selection over an anchored, filterable list: the input filters, but the committed value is the selected item, tracked separately from the filter text, with a check indicator on the chosen row. Single-select by default; set Multiple with @bind-Values for multi-select chips. This preview is the real component running in WebAssembly.

Examples

Selected: none

razor
<ZitsCombobox Items="_frameworks" @bind-Value="_value" Placeholder="Select framework..." />

@code {
    private string? _value;
    private static readonly string[] _frameworks =
        { "Next.js", "SvelteKit", "Nuxt.js", "Remix", "Astro", "Blazor" };
}

Installation

Terminal bash
navius add combobox

API reference

ZitsCombobox is generic over TItem. For single-select bind Value; for multi-select set Multiple and bind Values.

Prop Type Default
Items IReadOnlyList<TItem> []
Value TItem? -
ValueChanged EventCallback<TItem?> -
Multiple bool false
Values IReadOnlyList<TItem> []
ValuesChanged EventCallback<IReadOnlyList<TItem>> -
ItemToString Func<TItem, string>? -
Placeholder string? -
Side string "bottom"
Align string "start"