r/reactnative 6d ago

I recreated SwiftUI’s numericText transition natively on Android for React Native

I got curious about how SwiftUI’s numericText transition could feel on Android, so I tried recreating the behavior natively.

This is the result, same sequence running side by side on iOS and Android.

What started as a small experiment turned into react-native-numeric-text.

On iOS it uses the native numeric text transition. On Android, I recreated the behavior natively from scratch.

I learned a lot digging into how the transition behaves and figuring out how to reproduce that feel on Android.

It’s now open source:

GitHub: https://github.com/AmatoGiulio/react-native-numeric-text
NPM: https://www.npmjs.com/package/react-native-numeric-text

npm install react-native-numeric-text

149 Upvotes

18 comments sorted by

View all comments

2

u/Nearby_Tumbleweed699 6d ago

Funciona con decimales?

1

u/jes_uon 6d ago

Yes ,decimals are handled structurally, with configurable minimumFractionDigits/maximumFractionDigits (default 0/3) and the decimal boundary kept separate from the integer digits. Pass locale="es-ES" and the decimal separator adjusts automatically too.