Socket
Book a DemoInstallSign in
Socket

@newagebel/react-native-currency-field

Package Overview
Dependencies
Maintainers
4
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@newagebel/react-native-currency-field

A fully native TextInput component that supports all currencies and locales.

1.1.0
latest
Source
npmnpm
Version published
Weekly downloads
3
-62.5%
Maintainers
4
Weekly downloads
 
Created
Source

🤑 react-native-currency-field 🤑

A fully native TextInput component that supports all currencies and locales.

Demo

Currency: USD, Locale: en_USCurrency: EUR, Locale: de_DECurrency: UAH, Locale: uk_UA

Installation

npm install @newagebel/react-native-currency-field

or

yarn add @newagebel/react-native-currency-field

iOS Installation

cd ios && pod install && cd ..

Android Installation

There are no extra steps 💆‍♂️

Usage

import CurrencyField from '@newagebel/react-native-currency-field'

function MyComponent() {
  const [value, setValue] = useState(20);

  <CurrencyField
    value={value}
    onChangeText={setValue}
    currency={'EUR'}
    maxValue={10000}
    selectTextOnInit={false}
    style={style.inputStyle}
  />;
}

Props

PropTypeDefaultDescription
...TextInputPropsInherit all props of TextInput.
valuenumber0
onChangeTextfunction(unmaskedValue: number, maskedValue: string) => null
currencystringUSD
maxValuestring100000000
selectTextOnInitbooleanfalseSelect all text on initialization

To change the locale, you need to change the region in the phone settings.

License

MIT

Keywords

react

FAQs

Package last updated on 20 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.