0.2.2 • Published 6 years ago

react-native-animated-login v0.2.2

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

React Native Animated Login

This is a simple animated login component which is built on top of react native animated api. This uses native driver to acheive smooth animation with 60fps.

npm.io

Installation

npm install --save react-native-animated-login

Example

import react-native-animated-login module into your component

import LoginView from 'react-native-animated-login'

Inside your component render, use react-native-animated-login api to render view.

<LoginView 
    logo={require('/path/to/your/img.png')} 
    primaryColor="#512DA8"
    accentColor="#fff"
    FormComponent = {viewComponent}
    title="APP NAME"
    titleColor="#fff"
    submitText="LOGIN"
    submitTextColor="#000"
    submitButtonColor="#14ccad"
    onSubmit={ ()=>console.log('submitted') }
/>

Props

PropsTypeRequiredDescription
logoPropTypes.nodefalseIcon or image to be rendered
primaryColorPropTypes.stringfalsePrimary color of the app
accentColorPropTypes.stringfalseSecondary color of the app
titlePropTypes.stringfalseApp name to be rendered
titleColorPropTypes.stringfalseColor of the title text
FormComponentPropTypes.elementtrueForm component to be render after animation
submitTextPropTypes.stringfalseText in the submit button
submitTextColorPropTypes.stringfalseColor of the text in submit button
submitButtonColorPropTypes.stringfalseBackground color of submit button
onSubmitPropTypes.functruecallback function on submit

Contribution

Issues are welcome. Please add a screenshot of bug and code snippet.