r/reactnative • • 12d ago

FYI I recreated Telegram's Dynamic Island avatar animation in React Native (Skia + Reanimated)

The first time I saw this animation in Telegram, it felt like magic.

I wondered, "How did they build that?" especially the transition where the avatar smoothly merges into the Dynamic Island.

I wanted to understand how it works, so here is my recreation.

A few implementation details:

  • Skia renders the avatar using Telegram's original Lottie mask
  • Reanimated handles scroll-driven animations to keep everything smooth
  • On Android, the avatar smoothly merges into the top of the screen
  • On iPhones without Dynamic Island, the animation is simplified

Would love to hear your thoughts! I really like these little UI details that make an app feel more alive.

Source code: https://github.com/BohdanShh/telegram-profile-animation

126 Upvotes

12 comments sorted by

2

u/vqt907 12d ago

ow, I didn't know about this, they even made it work on an Android punch-hole screen :)

1

u/Remarkable-Stage144 12d ago

Yeah, their UI polish is next level

2

u/cookiedev23 7d ago

How do you get the native blur effect on the header ? Not the hard one which is the default, but the one you are using

1

u/Remarkable-Stage144 7d ago

It's the native scroll edge effect iOS 26+ draws under a transparent header. The hard one comes from headerBlurEffect, so set it to "none":

Since it's a system effect, it looks a bit different depending on the iOS version

2

u/cookiedev23 7d ago

Thank you! 🙏

5

u/anatooly2 12d ago

Thx Bohdan

1

u/Wicked-Tired-Otter 11d ago

This is incredibly smooth! The way the avatar merges into the Dynamic Island is such a nice touch.

Curious how you handled the transition between the Skia mask and the native UI. Did you run into any performance issues on Android?

1

u/Remarkable-Stage144 11d ago

Thanks! it's just a skia canvas, I use telegram's own lottie avatar mask and the scroll position picks the frame. The photo blurs and fades to black inside the mask, so it looks like it merges into the island (the island itself isn't touched)

Android has no island, so it just drips off the top of the screen. The only perf issue was the stars around the avatar, each was its own native view and android didn't like that, so I moved them all into one skia picture and it was fine

3

u/LovesWorkin 12d ago

Very cool!

2

u/Reaction_Physical 10d ago

the avatar melting into the dynamic island looks so smooth. good work figuring that out with skia.

2

u/Federal_Lawyer3540 9d ago

C'est toujours important de gérer les petits détails dans une application

1

u/AlwaysDeath 11d ago

Well done