0.1.9 • Published 3 years ago

@freakycoder/react-native-text-input v0.1.9

Weekly downloads
4
License
MIT
Repository
github
Last release
3 years ago

React Native Text Input

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

Installation

Add the dependency:

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

Peer Dependencies

"@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

PropertyTypeDefaultDescription
onChangeTextfunctionundefinedset the onChangeText functionality
disableButtonbooleanfalsedisable right component button
placeholderstringundefinedset the placeholder for text input

Customization (Optionals)

PropertyTypeDefaultDescription
onPressfunctionundefinedset your own logic for the button functionality when it is pressed
styleViewStyledefaultset or override the style object for the main container
buttonStyleViewStyledefaultset or override the style object for the button style
textInputStyleTextStyledefaultset or override the style object for the text input style
iconImageStyleImageStyledefaultset or override the style object for the image icon style
ImageComponentImagedefaultset your own component instead of default react-native Image component
inputRefreferenceundefinedset the TextInput reference for the programmatic usage
iconComponentanycomponentset your own icon component

Future Plans

  • LICENSE
  • Write an article about the lib on Medium

Author

FreakyCoder, kurayogun@gmail.com

License

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