Provides the behavior for a text input that allows editing a value as a formatted text.
An input value.
const [value, setValue] = useState<number>();const numberInputHandler = useMemo(() => new NumberInputHandler(new Intl.NumberFormat('en')), []);const { inputProps } = useFormattedNumber({ value, onChange: setValue, handler: numberInputHandler});<input {...inputProps} /> Copy
const [value, setValue] = useState<number>();const numberInputHandler = useMemo(() => new NumberInputHandler(new Intl.NumberFormat('en')), []);const { inputProps } = useFormattedNumber({ value, onChange: setValue, handler: numberInputHandler});<input {...inputProps} />
Provides the behavior for a text input that allows editing a value as a formatted text.