Skip to content

meecodebymariomurrent/react-native-text-input

 
 

Repository files navigation

React Native Text Input

React Native Text Input

npm version npm Platform - Android and iOS License: MIT styled with prettier

React Native Text Input

React Native TextInput React Native TextInput without button
React Native Text Input React Native Text Input

Installation

Add the dependency:

npm i @freakycoder/react-native-text-input

Peer Dependencies

IMPORTANT! You need install them
"@freakycoder/react-native-bounceable": "^0.2.4",

Usage

Import

import RNTextInput from "@freakycoder/react-native-text-input";

Fundamental Usage

<RNTextInput
  placeholder="E-mail"
  onChangeText={(text: string) => console.log("Text: ", text)}
/>

Without Button Usage

<RNTextInput
  disableButton
  placeholder="E-mail"
  onChangeText={(text: string) => console.log("Text: ", text)}
/>

Example Project 😍

You can checkout the example project 🥰

Simply run

  • npm i
  • react-native run-ios/android

should work of the example project.

Configuration - Props

Fundamentals

Property Type Default Description
onChangeText function undefined set the onChangeText functionality
disableButton boolean false disable right component button
placeholder string undefined set the placeholder for text input

Customization (Optionals)

Property Type Default Description
onPress function undefined set your own logic for the button functionality when it is pressed
style ViewStyle default set or override the style object for the main container
buttonStyle ViewStyle default set or override the style object for the button style
textInputStyle TextStyle default set or override the style object for the text input style
iconImageStyle ImageStyle default set or override the style object for the image icon style
ImageComponent Image default set your own component instead of default react-native Image component
inputRef reference undefined set the TextInput reference for the programmatic usage

Future Plans

  • LICENSE
  • Write an article about the lib on Medium

Author

FreakyCoder, [email protected]

License

React Native Text Input is available under the MIT license. See the LICENSE file for more info.

Packages

No packages published

Languages

  • Java 34.6%
  • Objective-C 24.7%
  • TypeScript 23.9%
  • JavaScript 9.2%
  • Ruby 4.2%
  • Starlark 3.4%