Component

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.
PropertyTypeDefaultDescription
SizeBOBSizeBOBSize.MediumVisual size of the input.
LoadingboolWhen , the input shows a loading indicator.
LoadingIndicatorVariantBOBLoadingIndicatorVariantBOBLoadingIndicatorVariant.CircularProgressVariant of the loading indicator shown when is .
DensityBOBDensityBOBDensity.StandardVertical density (gap) of the input.
ShadowShadowStyle?Shadow style applied to the input container.
BackgroundColorstring?Background color of the input. Accepts any valid CSS color value.
Colorstring?Text color of the input. Accepts any valid CSS color value.
PrefixTextstring?Text displayed before the input value.
PrefixIconIconKey?Material icon name for the Prefix.
PrefixColorstring?Prefix color. Accepts any valid CSS color value.
PrefixBackgroundColorstring?PrefixBackground color. Accepts any valid CSS color value.
SuffixTextstring?Text displayed after the input value.
SuffixIconIconKey?Material icon name for the Suffix.
SuffixColorstring?Suffix color. Accepts any valid CSS color value.
SuffixBackgroundColorstring?SuffixBackground color. Accepts any valid CSS color value.
Labelstring?Floating label displayed above the input when it has a value or focus.
HelperTextstring?Helper text displayed below the component for additional context.
Placeholderstring?Placeholder text shown when the component is empty.
Mindecimal?/// 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. ///
Maxdecimal?/// 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. ///
Stepdecimal1m/// Step size for the increment/decrement buttons and the step HTML /// attribute. UI hint only — re-validate on the server. ///
DecimalPlacesint?Number of decimal places to display. defers to the value type's default formatting.
AllowNegativebooltrueWhen , negative values are accepted; otherwise the input clamps at zero.
ShowStepButtonsbooltrueWhen , the StepButtons is shown.
ButtonPlacementStepButtonPlacementStepButtonPlacement.RightPlacement of the increment/decrement buttons relative to the input field.
UseThousandsSeparatorboolWhen , the displayed value is grouped with the culture's thousands separator.
CultureCultureInfo?Culture used for number formatting and parsing. Defaults to .
EnableMouseWheelboolWhen , MouseWheel is enabled.
EnableAccelerationbooltrueWhen , Acceleration is enabled.
AccelerationInitialDelayint400Initial delay (ms) before holding a step button starts accelerating.
AccelerationMinDelayint50Minimum delay (ms) between repeats once acceleration has ramped up.
AccelerationStepReductionint50Decrement (ms) applied to the repeat delay each acceleration tick until .
OnIncrementEventCallback<TValue?>Raised when the Increment event occurs.
OnDecrementEventCallback<TValue?>Raised when the Decrement event occurs.