r/reactnative • • Sep 25 '22

I've implemented this animated drawer UI in React Native [Source in comments]

238 Upvotes

18 comments sorted by

13

u/Massive_Educator_CG Sep 25 '22 edited Sep 26 '22

This is part of my open source project React-Native-UI-Templates and is inspired from this original Flutter project, where I have implemented similar UI templates for learning in react-native.

Source code:- https://github.com/Aashu-Dubey/React-Native-UI-Templates
Twitter:- https://twitter.com/aashudubey_ad/status/1484571529644212224

6

u/praveeja Sep 25 '22

Comment where

7

u/Massive_Educator_CG Sep 25 '22

I actually made the comment few minutes after the post, are you not able to see it? cause I checked in incognito now and it's not showing for some reason.

I'll try to post again, here's the source BTW
Source code:- https://github.com/Aashu-Dubey/React-Native-UI-Templates

31

u/daredeviloper Sep 25 '22

That is sick!! Personally I’m not sure I’m a fan of the rotating avatar though, love everything else

1

u/goughjo Sep 26 '22

I get what you mean. But it's a bit of a flex. It looks like OP is using a shared animated value. That could be used in other places.

1

u/Franks2000inchTV Sep 26 '22

Yeah, the rotating avatar is distracting, and good UI transitions like this shouldn't call attention to themselves.

I'd use the shared animation value to do something like have the items in the list fade in as it slides over or something like that.

Or if it has to be the avatar, have it slide in at a slightly different speed -- like a parallax effect.

The rotation doesn't feel connected to the finger movement, so it's a bit unnecessary.

The rest is beautiful though -- super well done.

12

u/gamebuster Sep 25 '22

Don’t animate unrelated stuff, it is distracting

-2

u/Nathanthebest04 Sep 25 '22

let the man do his thing 🤣

1

u/samvangucht Sep 26 '22

Looks good, how did you make it?

2

u/Massive_Educator_CG Sep 26 '22

The Drawer is from react-navigation with my own custom UI, and react-navigation provides you props with the progress of the drag, which you can use to apply interpolate animation for the drawer contents (Avatar and Item's background in this case).

Hope that explains it, rest you can check the source code on GitHub.

2

u/shawnsblog Sep 25 '22

The head nod…omg

2

u/jojawhi Sep 26 '22

Really cool! Thanks for sharing!

1

u/[deleted] Sep 26 '22

Maybe the avatar could split off from the dynamic island for more sass?

1

u/stocksniper97 Sep 27 '22

dm!

Looking for awesome react native developer for Silicon Valley startup :)

2

u/[deleted] Sep 26 '22

[removed] — view removed comment

2

u/Massive_Educator_CG Sep 26 '22

Thank you for your insights. I initially needed something to practice react-native, and I found this cool flutter project, so I decided to replicate it, to see how the same things can be done in react-native, So yes, it was basically me, learning and enjoying the creative process.

Though I do understand, over the top and unnecessary animations wouldn't really be a good choice for real world applications (for Accessibility and other reasons), but this is just demo. I also created the same thing in Ionic while I was learning it.

Care to share the Apple article though?