Form Field Numeric Input

A pre-composed form field that wraps a NumericInput control with automatic label, helper text, and error message display. Inherits from FormFieldBase, which provides EditContext integration, auto-generated control IDs, ARIA attribute wiring, and validation error state management. Generic over TValue constrained to struct, INumber<TValue> (int, decimal, double, etc.).

Default

A basic FormFieldNumericInput with integer binding, min/max constraints, and two-way binding via @bind-Value. The component automatically generates a unique ID to associate the label with the input for accessibility.
Enter a number between 1 and 100

Value: 1

With Increment Buttons

Set ShowButtons to true to display increment/decrement buttons. Use Step to control the increment amount and DecimalPlaces to format decimal display.
Use buttons or type a value

Price: ¤9.99

With Error

Use ErrorText to manually set a validation error. Click Validate to trigger the error when the value is zero or less.

Disabled

Set Disabled to true to prevent user interaction. The input and label display with reduced opacity.
Managed by inventory system.

EditForm Validation

Inside an EditForm, validation errors from DataAnnotationsValidator display automatically. Try submitting with invalid values.

Product Details

Set the pricing and stock for this product.

Enter the unit price