xl vision
  • Component
  • React Hooks
  • Playground
  • Overview
  • Color
  • Getting Start
    • Installation
  • General
    • Icon
    • Button
  • Layout
    • Grid
  • Form
    • Input
    • InputNumber
    • Textarea
  • Navigation
    • Dropdown
    • Affix
    • BackTop
    • Anchor
  • Data Display
    • Tooltip
    • Popover
    • Avatar
  • Faceback
    • Popconfirm
    • Dialog
    • Message
    • Notication
  • Animation
    • Transition
    • TransitionGroup
    • CollapseTransition
    • Ripple
  • Styles
    • Theme
    • CssBaseline
  • Basic Component
    • BaseButton
    • Portal
    • Popper
    • Modal
    • ResizeObserver

InputNumber

Enter a number within certain range with the mouse or keyboard.

Examples

Basic

Basic

Limit the number range

Limit the number range

Formatting number display

Formatting number display

High Precision Mode

Turning on high-precision mode can correctly calculate numbers that exceed the floating-point range. In this case, value will be represented as a string.

Scroll wheel

Use the mouse wheel to change number

Read-only and disabled

Read-only and disabled

Properties

PropertyDescriptionTypeDefaultRequire
prefixprefixReact.ReactNode-false
suffixsuffixReact.ReactNode-false
addonBeforenode addon beforeReact.ReactNode-false
addonAfternode addon afterReact.ReactNode-false
highPrecisionModeHigh precision mode. Turn on this mode to display numbers that exceed the floating point range. In this case, value will be displayed as a string.boolean-false
onChangevalue change eventfunction-false
valuevaluenumber | string | null-false
defaultValuedefault valuenumber | string | null-false
disableddisabled modeboolean-false
readOnlyreadOnly modeboolean-false
sizesize'middle' | 'large' | 'small''middle'false
minThe minimum number allowednumber | string-false
max允许填写的最大数字number | string-false
stepThe maximum number allowednumber1false
precisionNumber of decimal places to retainnumber-false
formatterFormat the number display format. After it is turned on, precision becomes invalid(value: number | string) => string-false
parserConvert the string generated by formatter to a number, and use it with formatter(value: string) => number | string | null-false
keyboardWhether to allow the keyboard up and down keys to change numbersbooleantruefalse
wheelWhether to allow the mouse wheel to change numbersboolean-false
controlsWhether to display the button for adjusting the number, which can also be customizedboolean | { upIcon?: ReactNode; downIcon?: ReactNode }truefalse
Examples
Basic
Limit the number range
Formatting number display
High Precision Mode
Scroll wheel
Read-only and disabled
Properties
Copyright © 2020-2021 Rhys Xia