RayCraftDocs
v1.0.3 raycraft.dev
On this page

Autocomplete

Free

Text field that filters a list while you type. Supports the arrow keys, Enter and Escape and follows the ARIA combobox pattern. The value is always one of the items.

Example

Autocomplete control

Parameters

ParameterTypeDescription
ClassstringExtra CSS classes added to the root element.
DebounceMillisecondsintWait after the last key before ItemsProvider is called (default 250).
DisabledboolDisables interaction.
DisplayNamestringName used in validation messages.
GroupByFunc<string, string>Returns the group heading of an item; items are listed under their headings.
HelperTextstringHint shown below the field.
ItemsIEnumerable<string>The options to choose from.
ItemsProviderFunc<string, CancellationToken, Task<IEnumerable<string>>>Loads the matches for the typed text (text, cancellation token); used instead of Items.
ItemTextFunc<string, string>Converts an item to its display text (defaults to ToString()).
LabelstringVisible label text (charts: accessible name; IconButton: accessible name and tooltip).
ListHeaderRenderFragment
MatchTextFunc<string, string>
MaxItemsintLargest number of suggestions shown. For Autocomplete and a searchable Select 0 (the default) shows every match of a fixed list and the first 10 results of an ItemsProvider; Breadcrumbs, Mention and MultiColumnComboBox have their own defaults.
MinCharsintCharacters required before suggestions appear.
OptionTemplateRenderFragment<string>Custom content for each option. The item is available as context.
PlaceholderstringPlaceholder shown when the field is empty.
ReadOnlyboolShows the value but does not allow changes.
ShowToggleboolAdds a button that opens the full list.
StylestringInline style added to the root element.
ValuestringCurrent value. Use with @bind-Value.

Events

EventTypeDescription
ValueChangedEventCallback<string>Raised when the value changes.

Package

Autocomplete is part of RayCraft Free. Package: RayCraft.Blazor. It comes from nuget.org. See Getting started.