Skip to content

NumberField

A specialized field for numeric input with support for min/max constraints and step increments.

PropTypeDefaultDescription
value(instance: TCommand) => unknownRequired. Accessor function returning the property value from the command instance.
titlestringThe label for the field.
placeholderstringPlaceholder text shown when empty.
minnumberMinimum allowed value.
maxnumberMaximum allowed value.
stepnumberIncrement/decrement step size.
requiredbooleanOverride automatic required detection.
<NumberField<UserCommand>
value={c => c.age}
title="Age"
min={0}
max={120}
step={1}
/>
<NumberField<ProductCommand>
value={c => c.price}
title="Price"
min={0}
step={0.01}
placeholder="0.00"
/>