Component changelog

NumberField changelog

Component-specific release notes collected from the full changelog. This page filters the published entries that mention NumberField.

Release

v1.2.0

npm
Minor Changes
  • 07e6783: Checkbox, Switch, Select and NumberField work inside Field.Root without Field.Control: they take the field's id (so Field.Label names them), name, disabled and required state, and get aria-describedby from Field.Description and Field.Error plus aria-invalid when the field is invalid. A control's own props still win.

  • a265579: Checkbox, Switch, Select and NumberField inside Field.Root now report focus, blur and edits to the field, so data-focused, data-touched and data-dirty follow them, and they carry the field's state attributes themselves. Fields also get data-filled while the control holds a value (non-empty text, a checked box, a picked option). Moving between a NumberField's input and its buttons doesn't count as leaving the field.

  • befc825: Checkbox takes indeterminate, uncheckedValue, form and inputRef; Switch takes uncheckedValue, form and inputRef; RadioGroup takes form and inputRef. Form reset now also works with a form outside the tree. Slider takes thumbCollisionBehavior (none, push, swap), format/locale, largeStep and form; its thumbs take getAriaLabel, getAriaValueText and inputRef. NumberField takes allowOutOfRange, snapOnStep, form and inputRef.

  • 07e6783: Add format and locale to NumberField. With format (Intl.NumberFormat options), the value shows as currency, a percent, a unit or with grouping; people can type formatted text such as "2,000" or "1.234,5", and it's reformatted when they leave the field. The value stays a plain number (25% is 0.25) and forms submit that number. The input keeps spinbutton semantics with aria-valuetext.

  • 07e6783: Add NumberField.ScrubArea: drag over it (for example a short label) to change the value, like the inputs in design tools. Moving right or up increments by one step per pixelSensitivity pixels (default 2), Shift uses largeStep, direction="vertical" switches the axis, and min and max still apply. It carries data-scrubbing while dragging. In Clarity it becomes a leading column of the field.

  • 07e6783: Add smallStep to NumberField: Alt/Option + ArrowUp/ArrowDown moves by it for fine adjustments (defaults to step / 10). Shift still uses largeStep.

  • 07e6783: Add onValueCommit to NumberField: it's called with the settled value on blur or Enter after typing, when a held stepper button is released, and right away for keyboard steps, and only when the value actually changed. Use it to save or validate without reacting to every keystroke.

  • 07e6783: Add allowWheelScrub to NumberField: while the input is focused, the mouse wheel steps the value (Shift uses largeStep) and the page doesn't scroll. Scrolling past an unfocused field never changes it.

Release

v1.1.2

npm
Patch Changes
  • c0b83c0Add stable NumberField part attributes and invalid state propagation.

Release

v1.0.0

npm
Patch Changes
  • 465e6d1Document NumberField keyboard interactions and ARIA spinbutton references.