rn-currency-input
v1.1.4
Published
Simple currency input for React Native
Downloads
55
Maintainers
Readme
rn-currency-input
This is a simple currency input for React Native. It allows for user input of
a currency value without flickering and only being built with the React
Native TextInput
component.
Installation
npm install rn-currency-input
Usage
The props interface extends the TextInput
interface so all standard props
and styling are available.
You can provide props for the masking function and whether to clear the input on focus.
By default the component will mask to North American currency and clear input.
import { useState } from 'react';
import { CurrencyInput } from 'rn-currency-input';
function MoneyInput() {
const [value, setValue] = useState(0);
return <CurrencyInput value={value} setValue={setValue} />;
}
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
Made with create-react-native-library