RayCraftDocs
v1.0.3 raycraft.dev
On this page

SearchBox

Free

Search field with an icon and a clear button. OnSearch runs on Enter, on the clear button and (optionally) on every keystroke; Escape clears the text.

Example

SearchBox control

Parameters

ParameterTypeDescription
ClassstringExtra CSS classes added to the root element.
DisabledboolDisables interaction.
DisplayNamestringName used in validation messages.
HelperTextstringHint shown below the field.
LabelstringVisible label text (charts: accessible name; IconButton: accessible name and tooltip).
PlaceholderstringPlaceholder shown when the field is empty.
ReadOnlyboolShows the value but does not allow changes.
SearchOnInputboolRaises OnSearch on every keystroke instead of only on Enter.
StylestringInline style added to the root element.
ValuestringCurrent value. Use with @bind-Value.

Events

EventTypeDescription
OnSearchEventCallback<string>Raised with the search text.
ValueChangedEventCallback<string>Raised when the value changes.

Package

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