All Projects → mkg0 → react-numeric

mkg0 / react-numeric

Licence: other
A react component for formatted number form fields

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to react-numeric

Vue Numeric
Input field component to display a formatted currency value based on Vue.js
Stars: ✭ 341 (+1036.67%)
Mutual labels:  money, input, currency
CurrencyEditText
A simple EditText input designed to input decimal and currency values.
Stars: ✭ 18 (-40%)
Mutual labels:  money, input, currency
Go Money
Go implementation of Fowler's Money pattern
Stars: ✭ 887 (+2856.67%)
Mutual labels:  money, formatter, currency
Javascript Number Formatter
Lightweight & Fast JavaScript Number Formatter
Stars: ✭ 119 (+296.67%)
Mutual labels:  formatter, currency, number
Easymoney
Library for operating with monetary values in JavaScript and Typescript 💵
Stars: ✭ 145 (+383.33%)
Mutual labels:  money, formatter, currency
terbilang
Sebuah pustaka untuk menterjemahkan angka ke dalam bilangan Bahasa Indonesia
Stars: ✭ 46 (+53.33%)
Mutual labels:  numeric, number
nova-money-field
Money Field for Laravel Nova
Stars: ✭ 71 (+136.67%)
Mutual labels:  money, currency
binarium
Binarium cryptocurrency is the first one protected from ASICs
Stars: ✭ 14 (-53.33%)
Mutual labels:  money, currency
stockholm
💵 Modern Python library for working with money and monetary amounts. Human friendly and flexible approach for development. 100% test coverage + built-in support for GraphQL and Protocol Buffers transports using current best-practices.
Stars: ✭ 26 (-13.33%)
Mutual labels:  money, currency
Jsr354 Ri
JSR 354 - Moneta: Reference Implementation
Stars: ✭ 223 (+643.33%)
Mutual labels:  money, currency
vue-number-keyboard
vue-number-keyboard是基于VUE实现的数字键盘插件,当前支持整数、小数数字输入、乱序键盘,demo中给出了常用的验证码、金额数字示例。数字键盘的大小包括字体尺寸支持响应式。
Stars: ✭ 51 (+70%)
Mutual labels:  money, number
numberbox-card
Replace input_number sliders with plus and minus buttons
Stars: ✭ 61 (+103.33%)
Mutual labels:  input, number
Megacoin
Welcome to Megacoin MΣC - Around the World!
Stars: ✭ 16 (-46.67%)
Mutual labels:  money, currency
bankster
Money Creation Made Easy
Stars: ✭ 30 (+0%)
Mutual labels:  money, currency
Prices
Python price handling for humans.
Stars: ✭ 248 (+726.67%)
Mutual labels:  money, currency
pesa
A JS money lib whose precision goes up to 11 (and beyond).
Stars: ✭ 38 (+26.67%)
Mutual labels:  money, currency
persian
Some utilities for Persian language in Go (Golang)
Stars: ✭ 65 (+116.67%)
Mutual labels:  currency, number
Guide-to-Swift-Numbers-Sample-Code
Xcode Playground Sample Code for the Flight School Guide to Swift Numbers
Stars: ✭ 92 (+206.67%)
Mutual labels:  money, currency
vue-translated
Internationalization (i18n) and localization (l10n) library for Vue.js v2.
Stars: ✭ 19 (-36.67%)
Mutual labels:  formatter, number
LEAmountInputView
Amount Input View (inspired by Square's design)
Stars: ✭ 44 (+46.67%)
Mutual labels:  input, currency

react-numeric

npm npm

A react component for formatted number form fields

react-numeric is a wrapper component for autonumeric.

Installition

yarn add react-numeric
# or
npm install react-numeric --save

Usage

import ReactNumeric from 'react-numeric';

export function USDMoneyInput(props){
  const { value } = props; // number typed
  return (
    <ReactNumeric
      value={value}
      currencySymbol="$"
      minimumValue="0"
      decimalCharacter="."
      digitGroupSeparator=""
      onChange={(event, value)=>{
        console.log(event.target.value); // '1,234.5 $'
        console.log(value); // 1234.5
      }}
    />
  );
}

// You can use predefinedOptions
import { predefinedOptions } from 'react-numeric';

export function PossitiveUSDMoneyInput(props){
  const { value } = props; // number typed
  return (
    <ReactNumeric
      value={value}
      preDefined={predefinedOptions.dollarPos}
      onChange={(e, value)=> this.setState({ value })}
    />
  );
}

// if you want to store value as string typed
export function NumberInput(props){
  const { value } = props; // string typed
  return (
    <ReactNumeric
      value={value}
      outputFormat="string"
      onChange={(e, value)=> this.setState({ value })}
    />
  );
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].