BOBInputText
Single-line text input with outlined, filled, and standard variants. Prefix/suffix slots, validation, and EditForm support built in.
API reference ↗Basic usage
As it appears on your ID.
RAZOR
<BOBInputText @bind-Value="_basic" Label="Your name" HelperText="As it appears on your ID." />Variants
Three visual styles for every form aesthetic.
RAZOR
<BOBInputText @bind-Value="_outlined" Variant="BOBInputVariant.Outlined" Label="Outlined" />
<BOBInputText @bind-Value="_filled" Variant="BOBInputVariant.Filled" Label="Filled" />
<BOBInputText @bind-Value="_standard" Variant="BOBInputVariant.Standard" Label="Standard" />Sizes
RAZOR
<BOBInputText @bind-Value="_small" Size="BOBSize.Small" Label="Small" />
<BOBInputText @bind-Value="_medium" Size="BOBSize.Medium" Label="Medium (Default)" />
<BOBInputText @bind-Value="_large" Size="BOBSize.Large" Label="Large" />Color & Background
RAZOR
<BOBInputText @bind-Value="_colorValue" Label="Custom Color & Background" Color="@PaletteColor.Secondary" BackgroundColor="@PaletteColor.SecondaryContrast" />Prefix & Suffix
Add icons or text to either side of the input.
https://
.com
RAZOR
<BOBInputText @bind-Value="_url" Label="Website" PrefixText="https://" />
<BOBInputText @bind-Value="_search" Label="Search" PrefixIcon="@BOBIconKeys.MaterialIconsOutlined.i_search" />
<BOBInputText @bind-Value="_domain" Label="Domain" SuffixText=".com" />Shadow
RAZOR
<BOBInputText @bind-Value="_shadowValue" Variant="BOBInputVariant.Outlined" Label="Elevation Shadow" Shadow="@BOBShadowPresets.Elevation(2)" />
<BOBInputText @bind-Value="_shadowValue" Variant="BOBInputVariant.Outlined" Label="Custom Shadow" Shadow="@(ShadowStyle.Create(5, 10, 0.14f, color: "purple"))" />States
Invalid email
RAZOR
<BOBInputText @bind-Value="_disabled" Label="Disabled" Disabled="true" />
<BOBInputText @bind-Value="_readonly" Label="Read-only" ReadOnly="true" />
<BOBInputText @bind-Value="_required" Label="Required" Required="true" />
<BOBInputText @bind-Value="_error" Label="Error" Error="true" HelperText="Invalid email" />
<BOBInputText @bind-Value="_loading" Label="Loading" Loading="true" />Properties
21 rows.
| Property | Type | Default | Description |
|---|---|---|---|
Size | BOBSize | BOBSize.Medium | Visual size of the input. |
Loading | bool | | When , the input shows a loading indicator. |
LoadingIndicatorVariant | BOBLoadingIndicatorVariant | BOBLoadingIndicatorVariant.CircularProgress | Variant of the loading indicator shown when is . |
Density | BOBDensity | BOBDensity.Standard | Vertical density (gap) of the input. |
Shadow | ShadowStyle? | | Shadow style applied to the input container. |
BackgroundColor | string? | | Background color of the input. Accepts any valid CSS color value. |
Color | string? | | Text color of the input. Accepts any valid CSS color value. |
PrefixText | string? | | Text displayed before the input value. |
PrefixIcon | IconKey? | | Material icon name displayed before the input value. |
PrefixColor | string? | | Color of the prefix text or icon. |
PrefixBackgroundColor | string? | | Background color of the prefix area. |
SuffixText | string? | | Text displayed after the input value. |
SuffixIcon | IconKey? | | Material icon name displayed after the input value. |
SuffixColor | string? | | Color of the suffix text or icon. |
SuffixBackgroundColor | string? | | Background color of the suffix area. |
Placeholder | string? | | Placeholder text shown when the input is empty. |
Label | string? | | Floating label displayed above the input when it has a value or focus. |
HelperText | string? | | Helper text displayed below the input for additional context. |
UpdateOnInput | bool | | When , the bound value is updated on every keystroke instead of only on blur. |
OnInput | EventCallback<string> | | Raised on every keystroke when is enabled. |
OnInputDebounceMs | int | | /// Trailing-edge debounce delay applied to only. When /// greater than 0, the callback fires after this many milliseconds of /// keyboard inactivity, coalescing burst keystrokes into a single invocation — /// the standard search-as-you-type pattern. 0 disables debouncing /// (default). is unaffected: when enabled, the /// bound still propagates immediately /// per keystroke. /// |