Skip to content

s-yadav/react-number-format

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
September 6, 2022 22:12
January 14, 2023 11:14
September 6, 2022 22:12
May 12, 2019 15:22
src
January 10, 2023 23:42
January 10, 2023 23:42
October 11, 2017 14:28
September 6, 2022 22:12
September 6, 2022 22:12
October 14, 2022 00:25
January 14, 2023 11:12
September 21, 2017 20:51
September 6, 2022 22:12
September 6, 2022 22:12
September 6, 2022 22:12
September 6, 2022 22:12
October 25, 2022 19:37

Actions Status

react-number-format

React Number format is a input formatter library with a sophisticated and lightweight caret engine.

Features

  1. Prefix, suffix and thousand separator.
  2. Custom pattern formatting.
  3. Masking.
  4. Custom formatting handler.
  5. Format number in an input or format as a simple text.
  6. Fully customizable

Install

npm

Using npm

npm install react-number-format

Using yarn

yarn add react-number-format

ES6

Numeric Format

import { NumericFormat } from 'react-number-format';

Pattern Format

import { PatternFormat } from 'react-number-format';

Read the full documentation here

https://s-yadav.github.io/react-number-format/docs/intro

Migrate from v4 to v5

https://s-yadav.github.io/react-number-format/docs/migration

v4 doc

v4 Docs

Development

  • Clone the repository or download the zip
  • npm i -g yarn to download Yarn
  • yarn to install dependencies
  • yarn start to run example server (http://localhost:8084/)
  • yarn test to test changes
  • yarn build to bundle files

Testing

Test cases are written in jasmine and run by karma

Test files : /test/**/*.spec.js

To run test : yarn test