NumberInput
Render an Astryx numeric input.
Astryx Props
JSON-safe NumberInput props forwarded to Astryx.
Supported Astryx props include:
label(string; required): Label text for the input (always rendered for accessibility).value(number or null or undefined; required): Current value of the input.onChange((value: number) => void; required): Callback fired when input value changes (only on valid input).size('sm' or 'md' or 'lg'): Size variant.isLabelHidden(boolean): Visually hide the label (still accessible to screen readers).description(string): Description text displayed between the label and input.isOptional(boolean): Whether the field is optional (mutually exclusive with isRequired).isRequired(boolean): Whether the field is required (mutually exclusive with isOptional).isDisabled(boolean): Whether the input is disabled.placeholder(string): Placeholder text.labelTooltip(string): Tooltip text to display in an info icon at the end of the label.startIcon(IconType): Icon to display at the start of the input. See 'npx astryx docs icons' for valid semantic names.labelIcon(IconType): Icon to display before the label text. See 'npx astryx docs icons' for valid semantic names.status({type: 'error' or 'warning' or 'success', message?: string}): Validation status with optional message.min(number or null): Minimum value allowed.max(number or null): Maximum value allowed.step(number or null): Step increment for the input.units(string or null): Units text to display at the end of the input (e.g., "%" or "GB").isIntegerOnly(boolean): Only allow integer values (no floating point).hasClear(boolean): Shows a clear (x) button when the input has a value. When true, the onChange callback also accepts null to signal the user cleared the input.htmlName(string): HTML name attribute for form submissions.autoComplete(string): HTML autocomplete attribute.hasAutoFocus(boolean): Whether to focus the input on mount.onFocus((e: FocusEvent<HTMLInputElement>) => void): Callback fired when the input receives focus.onBlur((e: FocusEvent<HTMLInputElement>) => void): Callback fired when the input loses focus.onEnter(() => void): Callback fired when the user presses the Enter key.
Props typed as React nodes, render functions, event handlers, refs, or StyleX styles are documented for Astryx parity but cannot be serialized directly from Python unless the wrapper adapts them.
See Astryx component docs: https://astryx.atmeta.com/components/NumberInput.
Functions
constructor__init__(value=None, *, label='', disabled=False, min=None, max=None, step=None, units=None, size=None, placeholder=None, integer_only=None, clear=None, description=None, status=None, select_on_focus=None, **props) -> Noneparamvalueint | float | None= NoneSynchronized component value.
paramlabelstr= ''Visible or accessible label for the component.
paramdisabledbool= FalseWhether the component should render disabled.
paramminint | float | None= NoneMinimum accepted value.
parammaxint | float | None= NoneMaximum accepted value.
paramstepint | float | None= NoneNumeric step increment.
paramunitsstr | None= NoneUnits displayed after the value.
paramsizestr | None= NoneInput size.
paramplaceholderstr | None= NonePlaceholder text.
paraminteger_onlybool | None= NoneWhether to accept only integer values.
paramclearbool | None= NoneWhether to show a clear button.
paramdescriptionstr | None= NoneHelper text displayed with the input.
paramstatusMapping[str, Any] | None= NoneValidation status record.
paramselect_on_focusbool | None= NoneWhether focusing the input selects its content, so typing replaces the
value. On by default for numeric inputs; pass False to opt out.
parampropsAny= {}Returns
None