React Native Animated Counter

preview_player
Показать описание
🔥 In this video tutorial we will create a custom animated counter component built with React Native Moti and powered by React Native Reanimated! It’s super customizable and comes packed with cool features:

- Stagger Functionality: Easily tweak the stagger animation to match what you need.
- Responsive Layout: No more worrying about the text not fitting—this counter adjusts to always stay within its space using onTextLayout.
- i18n Support: Got users from different regions? This counter’s got internationalization covered.
- Written in TypeScript

It’s the perfect addition for adding smooth, animated counters to your React Native app!
----
----

You can find me on:

---

Timeline:

00:00 Welcome and what we’ll build
00:35 VSCode and start coding
00:54 How to approach a Ticker component animation
03:00 Create the Vertical list for scrolling to the active number
04:12 Why a Vertical List and translateY
06:00 Create the cell container and overflow:hidden
07:48 fontVariant - tabular-nums - what it means
09:38 scroll to each number inside the vertical list
10:35 use Moti to animate the new state changes
11:39 Why the animation is not working and how to fix it
13:10 Apply a Stagger animation to each Number within the list
15:05 Fix the Text size when it will not fit inside the screen width
17:00 Apply numberOfLines and adjustFontSizeToFit
17:29 Get the Text layout and size via onTextLayout
19:20 Recalculate font size based on onTextLayout
19:50 Use Intl.NumberFormat to display it as currency

#react-native-reanimated #react-native-animation #react-native-counter #react-native-text-animation #react-native-stagger #reanimated-stagger #react-native-moti #reanimated-sequence
Рекомендации по теме
Комментарии
Автор

Thank you for the another awesome vid. Keep doing it! React Native world needs you!❤

jab
Автор

welcome back my idol <3. Stay health and keep it up!!!

t_himmel
Автор

great video. i want to ask, is it possible to have this kind of animation for prices that are updating in real time via a websocket? i want to display this same kind of animation but the prices are being updated every second from the real time stock data. thanks!

balawalchaudry
Автор

I saw this component berfore i think his name is

kokasiis
Автор

you should have provide Code for this !!

ranvijaykumarsingh
Автор

javascript has no more secrets for you

franckngoubounkou
Автор

Create animated titktok like homefeed please

jazzcafecoffee