BOBInputNumber
Strongly-typed numeric input with min/max, stepper buttons, acceleration, and culture-aware formatting.
API reference ↗Basic usage
RAZOR
<BOBInputNumber TValue="int" @bind-Value="_basic" Label="Quantity" />Variants
RAZOR
<BOBInputNumber TValue="int" @bind-Value="_outlinedValue" Label="Outlined" Variant="BOBInputVariant.Outlined" />
<BOBInputNumber TValue="int" @bind-Value="_filledValue" Label="Filled" Variant="BOBInputVariant.Filled" />
<BOBInputNumber TValue="int" @bind-Value="_standardValue" Label="Standard" Variant="BOBInputVariant.Standard" />Sizes
RAZOR
<BOBInputNumber TValue="int" @bind-Value="_smallValue" Label="Small" Size="BOBSize.Small" />
<BOBInputNumber TValue="int" @bind-Value="_mediumValue" Label="Medium (Default)" Size="BOBSize.Medium" />
<BOBInputNumber TValue="int" @bind-Value="_largeValue" Label="Large" Size="BOBSize.Large" />Color & Background
RAZOR
<BOBInputNumber @bind-Value="_colorValue" Label="Custom Color & Background" Color="@PaletteColor.Secondary" BackgroundColor="@PaletteColor.SecondaryContrast" />Prefix & Suffix
$
%
RAZOR
<BOBInputNumber TValue="decimal" @bind-Value="_price" PrefixText="$" Label="Price" Step="0.01m" DecimalPlaces="2" />
<BOBInputNumber TValue="int" @bind-Value="_percentage" SuffixText="%" Label="Discount" Min="0" Max="100" />Min & Max
Clamped between 0 and 100.
RAZOR
<BOBInputNumber TValue="decimal" @bind-Value="_decimal" Step="0.1m" DecimalPlaces="2" Label="Price" />Decimals & Step
RAZOR
<BOBInputNumber TValue="decimal" @bind-Value="_decimal" Step="0.1m" DecimalPlaces="2" Label="Price" />Step Buttons Placement
RAZOR
<BOBInputNumber TValue="int" @bind-Value="_leftPlacement" ButtonPlacement="StepButtonPlacement.Left" Label="Left" />
<BOBInputNumber TValue="int" @bind-Value="_splitPlacement" ButtonPlacement="StepButtonPlacement.Right" Label="Right (default)" />Shadow
RAZOR
<BOBInputNumber @bind-Value="_shadowValue" Variant="BOBInputVariant.Outlined" Label="Elevation Shadow" Shadow="@BOBShadowPresets.Elevation(2)" />
<BOBInputNumber @bind-Value="_shadowValue" Variant="BOBInputVariant.Outlined" Label="Custom Shadow" Shadow="@(ShadowStyle.Create(5, 10, 0.14f, color: "purple"))" />States
Parametrized error
RAZOR
<BOBInputNumber TValue="int" @bind-Value="_required" Label="Required" Required="true" />
<BOBInputNumber TValue="int" @bind-Value="_readonly" Label="ReadOnly" ReadOnly="true" />
<BOBInputNumber TValue="int" @bind-Value="_disabled" Label="Disabled" Disabled="true" />
<BOBInputNumber TValue="int" @bind-Value="_errorValue" Label="Error" Error="true" HelperText="Parametrized error" />Properties
34 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 for the Prefix. |
PrefixColor | string? | | Prefix color. Accepts any valid CSS color value. |
PrefixBackgroundColor | string? | | PrefixBackground color. Accepts any valid CSS color value. |
SuffixText | string? | | Text displayed after the input value. |
SuffixIcon | IconKey? | | Material icon name for the Suffix. |
SuffixColor | string? | | Suffix color. Accepts any valid CSS color value. |
SuffixBackgroundColor | string? | | SuffixBackground color. Accepts any valid CSS color value. |
Label | string? | | Floating label displayed above the input when it has a value or focus. |
HelperText | string? | | Helper text displayed below the component for additional context. |
Placeholder | string? | | Placeholder text shown when the component is empty. |
Min | decimal? | | /// Lower bound for the input, emitted as the min HTML attribute and /// enforced by the step buttons. UI hint only — re-validate on the server. /// |
Max | decimal? | | /// Upper bound for the input, emitted as the max HTML attribute and /// enforced by the step buttons. UI hint only — re-validate on the server. /// |
Step | decimal | 1m | /// Step size for the increment/decrement buttons and the step HTML /// attribute. UI hint only — re-validate on the server. /// |
DecimalPlaces | int? | | Number of decimal places to display. defers to the value type's default formatting. |
AllowNegative | bool | true | When , negative values are accepted; otherwise the input clamps at zero. |
ShowStepButtons | bool | true | When , the StepButtons is shown. |
ButtonPlacement | StepButtonPlacement | StepButtonPlacement.Right | Placement of the increment/decrement buttons relative to the input field. |
UseThousandsSeparator | bool | | When , the displayed value is grouped with the culture's thousands separator. |
Culture | CultureInfo? | | Culture used for number formatting and parsing. Defaults to . |
EnableMouseWheel | bool | | When , MouseWheel is enabled. |
EnableAcceleration | bool | true | When , Acceleration is enabled. |
AccelerationInitialDelay | int | 400 | Initial delay (ms) before holding a step button starts accelerating. |
AccelerationMinDelay | int | 50 | Minimum delay (ms) between repeats once acceleration has ramped up. |
AccelerationStepReduction | int | 50 | Decrement (ms) applied to the repeat delay each acceleration tick until . |
OnIncrement | EventCallback<TValue?> | | Raised when the Increment event occurs. |
OnDecrement | EventCallback<TValue?> | | Raised when the Decrement event occurs. |