Code Monkey home page Code Monkey logo

react-native-custom-floating-input-label's Introduction

React Native Floating TextInput Label - customisable

A React Native component that provides you to customise your TextInput. You can customise the label and other place holders.

Customisable floating input text

We can replicate the same exactly.

Usage

Use import in JS.

import FloatingTitleTextInputField from 'react-native-custom-floating-input-label'

Inside the class component:

<FloatingTitleTextInputField
                attrName='phoneNumber'
                value={this.state.aPhone}
                title={
                  this.state.textHolderPhoneFlag
                    ? 'Your mobile number'
                    : this.state.aPhone != ''
                    ? 'Your mobile number'
                    : 'Enter your mobile number'
                }
                keyboardType={'number-pad'}
                maxLength={10}
                updateMasterState={this._updateMasterState}
                focus={this._onFocus}
                blur={this._onBlur}
                textInputStyles={{
                  // here you can add additional TextInput styles
                  color: 'black',
                  fontSize: 15,
                  width: '100%'
                }}
                otherTextInputProps={{
                  // here you can add other TextInput props of your choice
                  maxLength: 10
                }}
              />

Hereby you can customize the label, active color, error color and changing the text will get reflected in the main thread which is similar to the native TextInput.

Version:

1.0.1

Features and Updates:

Customized border color and based on the keyboard type validations may occur.

List of Validations:

  • Email ID
  • Phone number based on countries
  • PAN number
  • Aadhar number

react-native-custom-floating-input-label's People

Stargazers

 avatar Nicodemus Ojwee avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.