| Name |
Type |
Default value |
Description |
|---|
| Accent |
BitColor? |
null |
The general color of the number field, used for its focus indicator and for the icon, prefix and suffix while the field is focused (Primary by default). |
| AriaDescription |
string? |
null |
Detailed description of the input for the benefit of screen readers. It is rendered into a visually hidden element that the input references through its aria-describedby attribute. |
| AriaPositionInSet |
int? |
null |
The position in the parent set (if in a set). |
| AriaSetSize |
int? |
null |
The total size of the parent set (if in a set). |
| AriaValueNow |
TValue? |
null |
Sets the control's aria-valuenow. Providing this only makes sense when using as a controlled component. |
| AriaValueText |
string? |
null |
Sets the control's aria-valuetext. |
| Background |
BitColorKind? |
null |
The color kind of the number field background (Primary by default). |
| Border |
BitColorKind? |
null |
The color kind of the number field border (Primary by default). |
| Classes |
BitNumberFieldClassStyles? |
null |
Custom CSS classes for different parts of the BitNumberField. |
| ContinuousSpinDelay |
int |
400 |
The delay in milliseconds before the value starts changing continuously while an increment/decrement button is held down. |
| ContinuousSpinInterval |
int |
75 |
The interval in milliseconds between two consecutive value changes while an increment/decrement button is held down. |
| DecrementAriaLabel |
string? |
null |
Accessible label text for the decrement button (for screen reader users). |
| DecrementIcon |
BitIconInfo? |
null |
Gets or sets the icon to display on the decrement button using custom CSS classes for external icon libraries. Takes precedence over DecrementIconName when both are set. |
| DecrementIconName |
string? |
null |
Gets or sets the name of the icon for the decrement button from the built-in Fluent UI icons. For external icon libraries, use DecrementIcon instead. |
| DecrementTitle |
string? |
null |
The title to show when the mouse is placed on the decrement button. |
| Description |
string? |
null |
A hint rendered under the field, describing what is expected of it (e.g. the accepted range or the unit). Unlike AriaDescription it is visible, and the input references it through its aria-describedby attribute so it is announced along with the field. |
| DescriptionTemplate |
RenderFragment? |
null |
A custom template rendered in place of the Description, referenced by the input through its aria-describedby attribute just the same. |
| DigitsNormalizer |
Func<string?, string?>? |
null |
A custom function to normalize the raw input string before it gets parsed into the value. When provided, it takes precedence over NormalizeDigits and lets the developer plug in their own culture-specific or domain-specific transformation. |
| FullWidth |
bool |
false |
Stretches the number field to the full width of its container. By default the field only takes the width it needs, which keeps a stepper from spanning a whole form row. |
| HideInput |
bool |
false |
Hides the text input element while keeping the increment/decrement buttons functional, turning the component into a stepper-only control. |
| IconAriaLabel |
string? |
null |
The aria label of the icon for the benefit of screen readers. |
| Icon |
BitIconInfo? |
null |
Gets or sets the icon to display alongside the number field using custom CSS classes for external icon libraries. Takes precedence over IconName when both are set. |
| IconName |
string? |
null |
Gets or sets the name of the icon to display alongside the number field from the built-in Fluent UI icons. For external icon libraries, use Icon instead. |
| IncrementAriaLabel |
string? |
null |
Accessible label text for the increment button (for screen reader users). |
| IncrementIcon |
BitIconInfo? |
null |
Gets or sets the icon to display on the increment button using custom CSS classes for external icon libraries. Takes precedence over IncrementIconName when both are set. |
| IncrementIconName |
string? |
null |
Gets or sets the name of the icon for the increment button from the built-in Fluent UI icons. For external icon libraries, use IncrementIcon instead. |
| IncrementTitle |
string? |
null |
The title to show when the mouse is placed on the increment button. |
| InputMode |
BitInputMode? |
null |
Overrides the virtual keyboard the browser shows for the input. By default it is Numeric for the integral types and Decimal for the fractional ones (float, double and decimal). Since neither of those keypads offers a minus sign on every platform, a field that has to accept negative values on touch devices is better served by Text, which brings up the full keyboard. |
| InvertMouseWheel |
bool |
false |
Reverses the direction of the value change when the user spins the value using the mouse wheel (the wheel only changes the value while the Shift key is held down, to keep normal page scrolling intact). |
| IsInputReadOnly |
bool |
false |
Makes only the text input part read-only, preventing typing, while the value can still be changed using the increment/decrement buttons, the arrow keys and the mouse wheel (unlike ReadOnly, which blocks all of them). |
| LabelPosition |
BitLabelPosition? |
null |
The position of the label in regards to the field (Top by default). |
| Label |
string? |
null |
Descriptive label for the number field, rendered next to it (per LabelPosition) and read by screen readers. |
| LabelTemplate |
RenderFragment? |
null |
Shows the custom Label for number field. If you don't call default label, ensure that you give your custom label an id and that you set the input's aria-labelledby prop to that id. |
| Min |
string? |
null |
The minimum value of the number field. Values below it get clamped to it, both when typed and when spinning. It is a string to support any numeric type of the field; an unparsable value falls back to the type's MinValue. |
| Max |
string? |
null |
The maximum value of the number field. Values above it get clamped to it, both when typed and when spinning. It is a string to support any numeric type of the field; an unparsable value falls back to the type's MaxValue. |
| Mode |
BitSpinButtonMode? |
null |
Determines how the increment/decrement buttons render: Compact (stacked at the end of the input), Inline (side by side at the end) or Spread (one on each side). When null (default), no buttons render, while the value can still be changed using the arrow keys and the mouse wheel. |
| NoBorder |
bool |
false |
Removes the border of the number field, which is what you want when it sits inside a surface that already provides one (a toolbar, a table cell or a card). |
| NoClamp |
bool |
false |
Keeps values typed outside of the Min/Max range intact instead of clamping them to the nearest bound, so that a form validation (e.g. a [Range] data annotation) can report the out-of-range value to the user instead of it being silently corrected. Stepping with the increment/decrement buttons, the arrow keys or the mouse wheel still stays inside the range, and the Home/End keys still jump to the bounds. |
| NoMouseWheel |
bool |
false |
Disables changing the value using the mouse wheel entirely (by default the value changes when the wheel is scrolled over the focused field while the Shift key is held down). |
| NoSelectOnFocus |
bool |
false |
Disables the automatic select-all of the input's text when the field receives focus. |
| NormalizeDigits |
bool |
false |
Normalizes non-Latin (e.g. Persian "۱۲۳" or Arabic "١٢٣") decimal digits to their Latin (0-9) equivalents before parsing. This is culture-agnostic and works for any Unicode decimal digit system. |
| NumberFormat |
string? |
null |
The format of the number in the number field, using the standard or custom .NET numeric format strings (e.g. "N0", "C0" or "000000"). The formatting is applied whenever the value is committed, while the bound value stays a plain number. Value-scaling formats (like the percent "P" format) are not suitable, since the scaled display cannot be parsed back into the same value. |
| OnBlur |
EventCallback<FocusEventArgs> |
|
Callback for when the control loses focus. |
| OnClear |
EventCallback |
|
Callback executed when the user clears the number field by clicking the clear button. |
| OnClick |
EventCallback<MouseEventArgs> |
|
Callback for when the input is clicked. |
| OnDecrement |
EventCallback<TValue> |
|
Callback for when the decrement button or down arrow key is pressed. |
| OnEnter |
EventCallback<KeyboardEventArgs> |
|
Callback for when the Enter key is pressed on the input. It is invoked after the typed text has been committed, so the bound value it observes is already the one the user just entered. |
| OnFocus |
EventCallback<FocusEventArgs> |
|
Callback for when focus moves into the input. |
| OnFocusIn |
EventCallback<FocusEventArgs> |
|
Callback for when focus moves into the input. |
| OnFocusOut |
EventCallback<FocusEventArgs> |
|
Callback for when focus moves out of the input. |
| OnIncrement |
EventCallback<TValue> |
|
Callback for when the increment button or up arrow key is pressed. |
| OnKeyDown |
EventCallback<KeyboardEventArgs> |
|
Callback for when a key is pressed down on the input. It is invoked for every key, including the ones the field handles itself (the arrow keys, PageUp/PageDown, Home/End and Escape). |
| OnKeyUp |
EventCallback<KeyboardEventArgs> |
|
Callback for when a key is released on the input. |
| OnMaxReached |
EventCallback<TValue> |
|
Callback for when a step lands the value on (or beyond) the explicit Max, letting the consumer react to the ceiling being hit. It only fires for an explicit Max, and only on the step that reaches it. |
| OnMinReached |
EventCallback<TValue> |
|
Callback for when a step lands the value on (or beyond) the explicit Min. It only fires for an explicit Min, and only on the step that reaches it. |
| PageStep |
string? |
null |
The amount by which the value changes when the user presses the PageUp/PageDown keys, providing a larger jump than the regular Step. It is a string to support any numeric type of the field; when not provided (or unparsable), PageUp/PageDown change the value by 10 times the Step. |
| ParsingErrorMessage |
string |
The {0} field is not valid. |
The message format used for invalid values entered in the input. |
| Placeholder |
string? |
null |
Input placeholder text. |
| Precision |
int? |
null |
How many decimal places the value should be rounded to. When not provided, the precision is derived from the fractional digits of the Step parameter (if any); otherwise no rounding is applied. A negative value rounds to a power of ten (e.g. -2 rounds to the nearest hundred). |
| Prefix |
string? |
null |
Prefix displayed before the numeric field contents. This is not included in the value.
Ensure a descriptive label is present to assist screen readers, as the value does not include the prefix. |
| PrefixTemplate |
RenderFragment? |
null |
Shows the custom prefix for numeric field. |
| ClearButtonIcon |
BitIconInfo? |
null |
Gets or sets the icon to display on the clear button using custom CSS classes for external icon libraries. Takes precedence over ClearButtonIconName when both are set. |
| ClearButtonIconName |
string? |
null |
Gets or sets the name of the icon for the clear button from the built-in Fluent UI icons. For external icon libraries, use ClearButtonIcon instead. |
| ClearButtonAriaLabel |
string? |
null |
Accessible label text for the clear button (for screen reader users), useful for localization. |
| ShowClearButton |
bool |
false |
Whether to show the clear button whenever the field is showing something, resetting the value to null with a single click (most useful with nullable value types). "Showing something" covers a string the user typed that failed to parse as well as a real value, so the button is also there to wipe an entry that has to be corrected. It is not rendered while the field is read-only or empty. It stays out of the tab order (like the increment/decrement buttons), the Escape key being the keyboard equivalent of clicking it. |
| SnapToStep |
bool |
false |
Snaps the committed value to the nearest multiple of the Step (anchored at the Min when one is provided), so typed values align to the same grid that the increment/decrement stepping produces. Without it, typed values are kept as-is (aside from min/max clamping and precision rounding). |
| Step |
string? |
null |
The difference between two adjacent values of the number field, applied when spinning the value using the increment/decrement buttons, the Up/Down arrow keys or the mouse wheel. A fractional step (e.g. "0.01") also implies the rounding precision of the field, unless an explicit Precision is provided. It is a string to support any numeric type of the field; an unparsable value falls back to 1. |
| Styles |
BitNumberFieldClassStyles? |
null |
Custom CSS styles for different parts of the BitNumberField. |
| Suffix |
string? |
null |
Suffix displayed after the numeric field contents. This is not included in the value.
Ensure a descriptive label is present to assist screen readers, as the value does not include the suffix. |
| SuffixTemplate |
RenderFragment? |
null |
Shows the custom suffix for numeric field. |
| Title |
string? |
null |
A more descriptive title for the control, visible on its tooltip. |
| Underlined |
bool |
false |
Renders the number field with a single bottom rule instead of a full border, the classic "underlined" input variant. |