Skip to content

NumberField

Overview

A numeric input container built on Reka UI's NumberFieldRoot, providing increment/decrement controls, min/max constraints, and v-model binding.

Theme entry: NumberField

Props

NameTypeRequiredDefaultDescription
themeOverrideString|Object|ArraynullA partial theme object merged with the component's default theme; accepts a class string, class array, or theme object.
classimport('vue').HTMLAttributes['class']undefinedAdditional CSS classes to apply to the root element.
modelValuenumberundefinedThe controlled numeric value.
defaultValuenumberundefinedThe default value when uncontrolled.
minnumberundefinedThe minimum allowed value.
maxnumberundefinedThe maximum allowed value.
stepnumberundefinedThe amount the value changes per increment or decrement step.
stepSnappingbooleanundefinedWhen false, prevents snapping to the nearest step increment.
focusOnChangebooleanundefinedWhen true, focuses the input when the value changes.
formatOptionsobjectundefinedIntl.NumberFormatOptions to format the displayed value.
localestringundefinedThe locale used for formatting.
disabledbooleanundefinedWhen true, prevents interaction with the number field.
readonlybooleanundefinedWhen true, the field is read-only.
disableWheelChangebooleanundefinedWhen true, prevents value changes on mouse wheel scroll.
invertWheelChangebooleanundefinedWhen true, inverts the direction of wheel-driven value changes.
idstringundefinedThe id of the underlying input element.
asstring|objectundefinedThe element or component to render as.
asChildbooleanfalseWhen true, merges props onto the child element instead of rendering a wrapper.
namestringundefinedThe name submitted with form data.
requiredbooleanfalseWhen true, the field is required.

Slots

default

Scoped slot.

Events

NameDescription
update:modelValueEmitted when the value changes.

Full event reference

Source

client/lib/controls/number-field/NumberField.vue

Documents matching: server v3.0.0a1.post1client v3.0.0-alpha.2