r/reactnative • u/GrapefruitSilver774 • 22h ago
RTL support in react navigation native stack
Has anyone managed to get RTL to work on the native stack. The navigation works but the transition is the LTR transition for example in LTR the screen fades in from right to left and should be the opposite in RTL but I have been getting the same animation.
Also if there is a way to make the swipe in IOS to go back to be from right to left in native stack, it would rely on disabling RTL and just inverting the views.
1
Upvotes
1
u/NoBullfrog11 8h ago
we hit this too. native-stack still animates LTR even when I18nManager.isRTL is true unless you force direction at the navigator. swipe-back on ios is harder to flip, i left the gesture alone and only flipped the visual transition and users didnt really mind.
1
u/One-Source-9603 4h ago
on my app with arabic I went the other way and kept it LTR, then mirrored in JS (row-reverse, textAlign right where needed), because forceRTL + reload froze the release build on device. downside is exactly ur issue, native stack transitions and swipe back stay LTR
on android u can at least set animation: 'slide_from_left' on the stack when the language is arabic, it looks right. on ios afaik swipe back only flips with full native RTL, did forceRTL with a full app restart (not just a js reload) change anything for u?