[material-ui] Finally add number input component #44284
Labels
component: text field
This is the name of the generic UI component, not the React module!
new feature
New feature or request
package: material-ui
Specific to @mui/material
The problem in depth
Can we finally consider adding a NumberField component to MUI?
This type of input is essential in most applications and it is about time this component is properly supported and available in @mui/material package.
According to the docs here, your recommendation is to use the NumberInput component from BaseUI but, in my opinion, it doesn't make much sense installing a package to use a single component. Another point is, NumberInput from base has a different look and feel compared to the material package components. If in a form we use fields from material mixed with the NumberInput from base, it will look weird.
I think what many developers are doing at the moment is to just use the
type="number"
prop and build the logic to parse the value to number on theonChange
handler. But it seems this should be something that @mui/material package should offer out-of-the-box.Issue #19154 related to this has been open for almost 5 years but no progress has been made to make this available so I am opening this issue in hope we can move this forward.
Maybe this number input field can be added with a behavior inspired by the NumberInput from BaseUI.
Thanks in advance!
Your environment
Browser used: Chrome 130.0.6723.91
`npx @mui/envinfo`
Search keywords: type number input field
Order ID: 101169
Search keywords:
The text was updated successfully, but these errors were encountered: