[BTAPP-31] Smooth bottom sheet animation with spring entry and fast exit #45
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/BTAPP-31"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Ticket
BTAPP-31 Investigate smoother slide-up animation for bottom sheet
Investigation findings
The jankiness had two root causes:
Animated.timingwith the default ease-in-out curve doesn't match the "arrives quickly then settles" feel of a native bottom sheet — spring physics does this naturallyOptions evaluated: spring physics tuning (chosen), custom Easing curves,
react-native-reanimatedworklets (no meaningful advantage overuseNativeDriverin RN 0.79), and@gorhom/bottom-sheet(heavy dependency for marginal gain here)Summary
visible=true): switches fromAnimated.timingtoAnimated.springontranslateYwithtension: 65, friction: 11— arrives decisively then settles without the linear "shudder"; scrim opacity stays timingvisible=false):Animated.timingwithEasing.in(Easing.quad)at 120 ms (vs 150 ms entry) — accelerates away, snaps off screen like platform conventions expectDISMISS_DURATION = 120tolib/animations.tsalongside the existingSLIDE_DURATIONSheetcomponent: children are accessible, dismiss button firesonClose