Numeric Input for interfaces built with Material-UI for React
npm install material-ui-numeric-input> Numeric Input for interfaces built with Material-UI for React
 
- Updated material-ui to version 5
- Removed styled-components in order to use material styled API
- Other packages updated
- Value prop now works as expected, like disabled inputs with calc.
- Input output value is now just a Number
- Value prop is now optional, the input have its own internal state
- Target output value is now a valid Number string
NPM
``bash`
npm install --save material-ui-numeric-input
Yarn
`bash`
yarn add material-ui-numeric-input
Demo: https://sampaioleal.github.io/material-ui-numeric-input
`tsx
import React from 'react';
import NumericInput from 'material-ui-numeric-input';
function Example() {
return (
precision={3}
decimalChar=','
thousandChar='.'
label='Example'
onChange={(event) => console.log(event.target.value)}
variant='outlined'
/>
);
}
``
MIT © SampaioLeal