What's Included
- TypeScript source (BouncyTabBar.tsx)
- useTabIndicator hook
- Expo Router integration example
- Demo screen with 4 tabs
- README with install + usage
About the Project
Built with react-native-reanimated v4 shared values and useAnimatedStyle worklets. It subscribes to expo-sensors DeviceMotion at a 16ms interval and reads rotation.beta (pitch) and rotation.gamma (roll), smoothing each value with a short withTiming window to filter sensor jitter without visible lag. Eleven absolutely-positioned cards each interpolate the tilt over [-90, 0, 90] with Extrapolation.CLAMP, scaling the travel range, scale, and opacity by card index to create the receding-tunnel depth cue. Because the iOS Simulator has no motion sensor, a USE_SIMULATED_MOTION flag swaps in a useFrameCallback worklet that traces a figure-eight path for recording previews. Wrapped in a GestureHandlerRootView and tested on Expo SDK 56 (iOS + Android). Requires a development build (expo run:ios / run:android), not Expo Go, due to the Reanimated/Worklets native config.