1.1.1 • Published 4 years ago

currency-formatter-react v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

currency-formatter-react

React component to format number in various currencies

Installations

npm

Through npm

npm install --save currency-formatter-react

Usage

import CurrencyFormatter from 'currency-formatter-react'

Props

PropsOptionsDefaultDescription
valuenumbernoneValue which need to be format
thousandSeparatorbooleantrueAdd thousand separators on number
currencystringUSDAdd Currency Code (INR , USD , GBP ..)
isFloatbooleanfalsemake this prop to true if value is float

Supported Currencies

Currency CodeCurrencySymbol
CADCanadian Dollar$
EUREuro
GBPGreat Britan Pound£
INRIndian Rupee
JPYJapanese Yen¥
LKRSri Lanka RupeeRs
NZDNew Zealand Dollar$
SGDSingapore Dollar$
THBBaht฿
USDUS Dollar$
ZARRandR

Examples

<CurrencyFormatter value={1257856} thousandSeparator={true} currency='USD' />

Output : $ 1,257,856

<CurrencyFormatter value={1257856} currency='INR' />

Output : ₹ 1,257,856

<CurrencyFormatter value={1257856} thousandSeparator={true} currency='GBP' />

Output : £ 1,257,856

<CurrencyFormatter
  value={1257856.85}
  currency='INR'
  thousandSeparator={false}
  isFloat={true}
/>

Output : ₹ 12,57,856.85

License

MIT © vinnu214

1.1.1

4 years ago

1.1.0

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago