JSPM

react-native-locale-number-input

1.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q12975F
  • License ISC

It support numeric input based on region changes and show formatted value.

Package Exports

  • react-native-locale-number-input
  • react-native-locale-number-input/index.tsx

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-locale-number-input) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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