react-native-locale-number-input

1.1.1 • Public • Published

React Native LocaleNumberInput

React Native LocaleNumberInput This is made to solve the problem of Numeric TextInput which is not supporting value format & input accept based on user device region for both Android and iOS.

Note: This library has a peer dependency:- react-native-localize. but you don't need to install manually this dependency.

Maintainers

This library is being maintained by Ranjan Sharma. It is self motivated work.
Feel free to provide your feedback, If you see any room for improvement in this, it really makes a difference.

Platform compatibility

This project is compatible with iOS, and Android

Getting Started

Installation

yarn add react-native-locale-number-input or npm install react-native-locale-number-input --save

This library support autolinking

Usage

Import the LocaleNumberInput component from react-native-locale-number-input and use it like so:

import React, { useState } from "react";
import { View } from "react-native";
import LocaleNumberInput from "react-native-locale-number-input";

// ...
const App = () => {
  const [inputValue, setInputValue] = useState<string>("");
  return (
    <View style={{ flex: 1 }}>
      <LocaleNumberTextInput
        inputValue={inputValue}
        handleChange={setInputValue}
      />
    </View>
  );
};

Props And Events

Prop Type Default Note
value string - TextInput value prop
handleChange function - It is similar like onChangeText of TextInput prop
customStyle Stylesheet - Provide your custom style using this props, It supports all style props of TextInput
Other all props of TextInput TextInputProps - You can provide all other props of TextInput

Contributing

Contributions are welcome

License

MIT

Package Sidebar

Install

npm i react-native-locale-number-input

Weekly Downloads

1

Version

1.1.1

License

ISC

Unpacked Size

9.83 kB

Total Files

5

Last publish

Collaborators

  • ranjansharma1412