expo-hinge
v58.0.2
Published
Provides the device hinge angle and status on iPhone Duo and Android foldables.
Readme
expo-hinge
Provides the device hinge angle and status on iPhone Duo and Android foldables, for the whole app, through a sync getter, a listener and a useHinge() hook. For a per-view SwiftUI modifier, see onHingeChange in @expo/ui.
API documentation
Installation in managed Expo projects
For managed Expo projects, please follow the installation instructions in the API documentation for the latest stable release.
Installation in bare React Native projects
For bare React Native projects, you must ensure that you have installed and configured the expo package before continuing.
Add the package to your npm dependencies
npx expo install expo-hingeConfigure for iOS
Run npx pod-install after installing the npm package. Hinge updates need iOS 27.1 and a build made with the iOS 27.1 SDK (Xcode 27.1); older builds and devices without a hinge report null.
Configure for Android
No additional set up necessary. Hinge updates need Android 11 (API level 30) or later and a device with a hinge angle sensor; other devices report null.
Contributing
Contributions are very welcome! Please refer to guidelines described in the contributing guide.
