Demo

Number precision and clamping

Documented in NumberField.

Number precision and clamping

NumberField decimals rounding the committed value, restrictDecimals refusing extra fraction digits while typing, clampBehavior blur or none, and details.formattedValue as the displayed text.

decimals={2}: type 1.23456 and blur
value 2.5 · details.formattedValue "2.50 kg" · reason none
18 to 99: type 150 and blur
Age value: 30