r/reactnative • • Mar 19 '19

The login animation I implemented using React Native

374 Upvotes

38 comments sorted by

View all comments

1

u/Afrood Mar 22 '19

Hey u/alexandr1us this is awesome work!

I've implemented this in an app im fiddling with and it works like a charm!

Quick question, say I wanna use the Input fields (TextFields) only and not the button + button Animation, what can I remove from the code?

I am not very good at animating etc. so I am having a hard time working my head around it.

Cheers

1

u/alexandr1us Mar 22 '19

So you just want to have textfields fade away?

You only need these lines then:

Animated.timing(this.state.inputAnimation, {
toValue: 0,
duration: 300,
delay: 100
})

const translateY = this.state.inputAnimation.interpolate({
inputRange: [0, 1],
outputRange: [0, 60]
})

1

u/Afrood Mar 22 '19

Perfect! Thanks a lot man. If you have any other animations that you want to share please do! amazing work.

1

u/alexandr1us Mar 22 '19

Yes It's WIP right now