Skip to content
+

Number Input

The Number Input component provides users with a field for integer values, and buttons to increment or decrement the value.

NumberInput API

Import

import { Unstable_NumberInput as NumberInput } from '@mui/base/Unstable_NumberInput';
// or
import { Unstable_NumberInput as NumberInput } from '@mui/base';
Learn about the difference by reading this guide on minimizing bundle size.

Props

Props of the native component are also available.

defaultValue

disabled

endAdornment

error

id

max

min

onChange

onInputChange

readOnly

required

shiftMultiplier

slotProps

slots

startAdornment

step

value


The ref is forwarded to the root element.

Slots

To learn how to customize the slot, check out the Overriding component structure guide.

root

input

incrementButton

decrementButton

CSS classes

These class names are useful for styling with CSS. They are applied to the root slot when specific states are triggered.

.Mui-disabledSTATE

.Mui-errorSTATE

.Mui-focusedSTATE

.Mui-readOnlySTATE

.MuiNumberInput-adornedEnd

.MuiNumberInput-adornedStart

.MuiNumberInput-formControl