5.0.0 • Published 1 year ago

react-native-login-screen v5.0.0

Weekly downloads
149
License
MIT
Repository
github
Last release
1 year ago

Battle Tested ✅

One Line of Code to Plug & Play | Fully Customizable Beautiful React Native Login Screen

npm version npm Platform - Android and iOS License: MIT

🥳 Version 5

Version 5 with the completely new UI

  • Whole new UI / UX Design 😍
  • Built-in Email Validation 📧
  • Built-in Password Validation 🔒
  • Built-in Email Tooltip 📧
  • Built-in Password Tooltip 🔒
  • Built-in Show/Hide Password Feature 👀
  • Fully Customizable 🎨
  • Better Code Quality 🚀
  • Ready to use SocialButton Component
  • Only ONE dependency is needed

Installation

Add the dependency:

npm i react-native-login-screen

Peer Dependencies

IMPORTANT! You need install them.
npm i react-native-text-input-interactive
"react-native-text-input-interactive": ">= 0.1.3"

Import

import LoginScreen from "react-native-login-screen";

Usage

<LoginScreen
  onLoginPress={() => {}}
  onSignupPress={() => {}}
  onEmailChange={(value: string) => {
    username = value;
    console.log('username: ', username);
  }}
  onPasswordChange={(password: string) => {}}
/>

Basic Signup Screen Usage

<LoginScreen
  logoImageSource={require('./assets/logo-example.png')}
  onLoginPress={() => {}}
  onSignupPress={() => {}}
  onEmailChange={(value: string) => {
    username = value;
    console.log('username: ', username);
  }}
  loginButtonText={'Create an account'}
  disableSignup
  textInputChildren={
    <View style={{marginTop: 16}}>
      <TextInput
        placeholder="Re-Password"
        secureTextEntry
        onChangeText={(value: string) => {}}
      />
    </View>
  }
  onPasswordChange={(password: string) => {}}
/>

Usage with Social Button

You can put any children into the LoginScreen, I recommend you to use SocialButton.

Configuration - Props

Fundamentals

PropertyTypeDefaultDescription
onLoginPressfunctionundefinedset your own function when the login button is pressed
onSignupPressfunctionundefinedset your own function when the Create an account is pressed
onEmailChangefunctionundefinedset your own function when email textinput has a change
onPasswordChangefunctionundefinedset your own function when password textinput has a change

Customizations (Optional)

PropertyTypeDefaultDescription
onEyePressfunctionundefinedset your own function when eye icon button is pressed
signupTextstring"Create an account"change the sign up text
disableSignupbooleanfalsedisable the signup if you do not want to use it
disableDividerbooleanfalsedisable the divider if you do not want to use it
disableSocialButtonsbooleanfalsedisable the all social buttons
disablePasswordInputbooleanfalsedisable the password text input
disableEmailValidationbooleanfalsedisable built-in email validation
disableEmailTooltipbooleanfalseenable built-in password validation
disablePasswordTooltipbooleanfalsedisable built-in email tooltip
disableEmailTooltipbooleanfalsedisable built-in password tooltip
emailPlaceholderstring"Email"change email placeholder text
passwordPlaceholderstring"Password"change password placeholder text
loginButtonTextstring"Login"change login button's text
styleViewStyledefaultset/override the default style for the container
dividerStyleViewStyledefaultset/override the default divider style
logoImageStyleImageStyledefaultset/override the default image style
textInputContainerStyleViewStyledefaultset/override the default text input container style
loginButtonStyleViewStyledefaultset/override the default login button style
loginTextStyleTextStyledefaultset/override the default login text style
signupStyleViewStyledefaultset/override the default signup button style
signupTextStyleTextStyledefaultset/override the default signup text style
signupTextStyleTextStyledefaultset/override the default signup text style
passwordContentTooltipComponentdefaultset on your own tooltip content for password
emailContentTooltipComponentdefaultset on your own tooltip content for email

Advanced Customizations (Optional)

PropertyTypeDefaultDescription
customTextInputsComponentdefaultset your own custom text inputs instead of built-in ones
textInputChildrenComponentdefaultset your own EXTRA custom text inputs with the current ones
customLogoComponentdefaultset your own logo
customLoginButtonComponentdefaultset your login button
customSignupButtonComponentdefaultset your sign up button
customDividerComponentdefaultset your divider
customLoginButtonComponentdefaultset on your own components instead of default login button
customSignupButtonComponentdefaultset on your own components instead of default signup button
TouchableComponentPressableTouchableOpacityset on your own Touchable Component
customTextInputsComponentdefaultset on your own textinputs instead of default ones
customSocialLoginButtonsComponentdefaultset on your own components instead of default social login buttons
emailTextInputPropsIInteractiveTextInputPropsdefaultset/override the email text input props
passwordTextInputPropsIInteractiveTextInputPropsdefaultset/override the password text input props

Default Social Login Buttons (Optional)

PropertyTypeDefaultDescription
onFacebookPressfunctionundefinedset your own function for the Facebook social button press
onTwitterPressfunctionundefinedset your own function for the Twitter social button press
onApplePressfunctionundefinedset your own function for the Apple social button press
onDiscordPressfunctionundefinedset your own function for the Discord social button press

Version 2 is still available

if you do not like the new design, you can still use the old design :)

npm i react-native-login-screen@2.1.4

Roadmap

  • LICENSE
  • Android Design Bug Fixes
  • Configuration - Props COMING SOON
  • Typescript Challenge!
  • Remove some dependencies
  • Better TextField Library Integration
  • Password show/hide
  • Customizable Components
  • Customizable Styles
  • Built-in Email Validation
  • Built-in Password Validation
  • Built-in Email Tooltip
  • Built-in Password Tooltip
  • Write an article about the lib on Medium
  • Write an article about the lib on DevTO

Credits

For the awesome photo thanks to jcob nasyr from Unsplash

Author

FreakyCoder, kurayogun@gmail.com

License

React Native Login Screen is available under the MIT license. See the LICENSE file for more info.

5.0.0

1 year ago

4.2.0

2 years ago

3.1.0

2 years ago

4.1.0

2 years ago

4.0.1

2 years ago

4.0.0

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.1.4

3 years ago

2.1.3

3 years ago

2.1.2

3 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.0

4 years ago

0.3.7

4 years ago

0.3.6

4 years ago

0.3.5

4 years ago

0.3.4

4 years ago

0.3.3

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.5

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.4

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.12

4 years ago

0.1.11

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.1

5 years ago