Socket
Socket
Sign inDemoInstall

auth-input

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    auth-input

Set of authentication inputs for React Native including name, email, phone number and show/hide password.


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
9.01 kB
Created
Weekly downloads
 

Readme

Source

Auth Input

alt-текст

Auth Input is a React Native custom component, providing fields for entering name, password, phone number and email.

Installation

Install the package with NPM.

npm i auth-input

Usage

Usage is very simple. Just add the component to your file.

import React, {useState} from 'react';
import { Text, View } from 'react-native';
import AuthInput from 'auth-input'

export default function App() {
    const [email, setEmail] = useState('')
    const [password, setPassword] = useState('')
   
    const emailHandler = (text) => {
        setEmail(text)
    }
    const passwordHandler = (text) => {
        setPassword(text)
    }

 
  return (
                        <AuthInput
                            type="email"
                            label="E-Mail"
                            keyboardType="email-address"
                            minLength={5}
                            maxLength={35}
                            autoCapitalize="none"
                            errorText="Please, use a valid e-mail."
                            onInputChange={emailHandler}
                            value={email}
                        />

                        <AuthInput
                            type="password"
                            label="Password"
                            keyboardType="default"
                            minLength={5}
                            maxLength={15}
                            autoCapitalize="none"
                            errorText="Please, use a valid password."
                            onInputChange={passwordHandler}
                            value={password}
                        />
    </View>
  );
}

Properties

PropTypeDescriptionDefaultOptional
typestringType of input ("email", "phone", "name" or "password")-no
labelstringText above the input-no
keyboardTypestringDefault Ract Native TextInput keyboard typesdefaultyes
minLengthnumberlower bound of text length-yes
maxLengthnumberUpper limit of text length-yes
errorTextstringText that appears when the user has entered incorrect data-no
onInputChangefunctionInput handler function-no
valuestringInput state-no
borderColorstringBottom border colorblackyes
errorTextColorstringError colorredyes
textColorstringText colorblackyes
labelColorstringLabel above the input colortextColoryes
labelColornumberLabel above the input font size20yes

You can use properties of TextInput.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Keywords

FAQs

Last updated on 28 May 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc