Basic Usage
Numeric fields are specialized input controls designed for collecting numeric values of any type. Built on the foundation of fields, they automatically restrict input to valid numbers and provide intuitive controls for incrementing and decrementing values.
Use Min and Max to set boundaries, and Step to control increment amounts.
<MudNumericField @bind-Value="IntValue" Label="Standard" Variant="Variant.Text" Min="0" Max="10" /> <MudNumericField @bind-Value="DoubleValue" Label="Filled" Variant="Variant.Filled" Min="0.0" /> <MudNumericField @bind-Value="DecimalValue" Label="Outlined" Variant="Variant.Outlined" Step=".2M" />
@code { public int IntValue { get; set; } public double DoubleValue { get; set; } public decimal DecimalValue { get; set; } }
Common Properties
Control the most frequently used properties to customize the behavior and appearance of numeric fields.
Data Binding
Numeric fields support different data binding patterns depending on your requirements for default values and empty states.