JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 78
  • Score
    100M100P100Q76105F
  • License MIT

React Number input component. Allow to input formatted number values. Also you can use this component as example of inputCore component with reformat user function

Package Exports

  • react-numberinput

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-numberinput) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-numberinput

DEMO: https://xnimorz.github.io/masked-input/

Component that allow to format only numbers. (5 000, 123 456 789, etc.)

Installation

npm install --save react-numberinput

or

yarn add react-numberinput

This component work on top of react-maskinput and define custom formatting function called reformat. Also you can use this component as example to create you own components based on react-maskinput.

Usage

import NumberInput from 'react-numberinput';

ReactDOM.render(someElement, <NumberInput />);

You also can set up different input element properties, such as class, data-attributes, etc. This component works well with another libraries, styled-components as example:

import React, { Component } from 'react';
import MaskInput from 'react-maskinput';
import NumberInput from 'react-numberinput';

const StyledNumberInput = styled(NumberInput)`
  border-radius: 10px;
  border-color: rgb(219, 112, 147);
`;

render(<StyledNumberInput />);

Props

See https://github.com/xnimorz/masked-input/tree/master/packages/react-maskinput#props

License

MIT