Back to Browse

How to Make a Sensor-Based Parallax Effect in React Native

4.8K views
Nov 13, 2023
6:25

This step-by-step tutorial shows you how to add a cool parallax effect to your React Native application using the device sensors. To implement this we're going to use `useAnimatedSensor` hook from React Native Reanimated. Enjoy! Links: 🏞 Assets: https://github.com/software-mansion-labs/reanimated-parallax/tree/main/assets 🧑‍💻 Source code: https://github.com/software-mansion-labs/reanimated-parallax/blob/main/App.js 🐎 Documentation: https://docs.swmansion.com/react-native-reanimated/docs/device/useAnimatedSensor Kudos to Kacper Kapuściak for making this tutorial. If you'd like to learn more React Native tips, don't forget to follow: 🐦 Kacper on Twitter: https://twitter.com/kacperkapusciak 🐦 Software Mansion on Twitter: https://twitter.com/swmansion 0:00 Intro 0:23 Project setup 1:32 Declaring markup and styles 2:21 Using rotation sensor 5:55 Outro #reactnative #reanimated #programming #mobileappsdevelopment #mobileapps #reactnativetutorial Music: Cinematic HipHop 001 by Sascha Ende Free download: https://filmmusic.io/song/526-cinematic-hiphop-001 Licensed under CC BY 4.0: https://filmmusic.io/standard-license

Download

1 formats

Video Formats

360pmp416.8 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

How to Make a Sensor-Based Parallax Effect in React Native | NatokHD