Numeric Input
A semantic numeric field backed by react-number-format.
A semantic numeric field backed by react-number-format.
import { NumericInput } from "@zentara-co/zenos-ui";NumericInput uses the shared Zenos sm, md, and lg control scale from Input.
Variants
Section titled “Variants”Surfaces match Input: default (standard), filled (subtle), and none (borderless).
States
Section titled “States”Hover, focus, invalid, and disabled treatments are inherited from Input. Invalid matches Input. Use Field.Root invalid to connect error text.
Formatting
Section titled “Formatting”NumericInput accepts react-number-format formatting options while keeping the Zenos Input surface and semantic numeric callback.
Controlled value
Section titled “Controlled value”onValueChange receives a parsed number or undefined when the control is empty, so application state does not need to parse the displayed string.
Parsed value: 2500
Variants
defaultfillednone Sizes
smmdlg API
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | — | Controlled parsed numeric value. |
defaultValue | number | — | Initial uncontrolled value. |
onValueChange | (value: number | undefined) => void | — | Runs with the parsed number, or undefined when empty. |
variant | default | filled | none | default | Surface treatment inherited from Input (`default` = standard, `filled` = subtle, `none` = borderless). |
size | sm | md | lg | md | Control height inherited from Input. |
allowNegative | boolean | — | Allows a leading minus sign. |
decimalScale | number | — | Maximum decimal digits. |
prefix / suffix | string | — | Displayed affixes. |
Unless narrowed above, each DOM-rendering part also accepts its underlying native or Base UI props,
including className, style, aria-*, and data-*.
Accessibility
Section titled “Accessibility”NumericInput renders a native text input with a decimal input mode so formatted characters can coexist with numeric entry. Pair it with Field.Label, and include units in the visible label when a prefix or suffix alone could be ambiguous.