expo-constants
@amazon-devices/expo-constants provides system information that remains constant throughout the lifetime of your app's install.
Installation
-
Add the JavaScript library dependency in the
package.jsonfile. Select the tab for your React Native version.
dependencies: { ... "@amazon-devices/expo-constants": "~2.0.0", "expo": "~50.0.0", ... }
dependencies: { ... "@amazon-devices/expo-constants": "~3.0.0", "expo": "~50.0.0", ... } -
Reinstall dependencies using
npm installcommand.
Examples
import React from 'react';
import Constants from '@amazon-devices/expo-constants';
import {StyleSheet, Text, View} from 'react-native';
export const App = () => {
return (
<View style={styles.container}>
<Text style={styles.text}>
isHeadless: {String(Constants.isHeadless)}
</Text>
<Text style={styles.text}>
statusBarHeight: {Constants.statusBarHeight}
</Text>
<Text style={styles.text}>
systemFonts: {Constants.systemFonts.join(', ')}
</Text>
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'white',
justifyContent: 'center',
alignItems: 'center',
},
text: {
fontSize: 30,
color: 'black',
},
});
API reference
Check out the dedicated documentation page for info about this library, API reference and more: Official Expo documentation for expo-constants.
Implementation details
Currently, all values are mocks. Don't depend on any of the constants inside this package.
Supported versions
| NPM package version | Vega SDK version | Vega OS version | React Native version |
|---|---|---|---|
| 2.0.1758683737 | 0.23 and earlier | OS 1.1 (1401010009820) and earlier |
0.72 |
| 3.0.1+15.2.0 | 0.24 | OS 1.2 (2101020054720) |
0.72, 0.83 |
Additional resources
For information on additional libraries, see Supported Third-Party Libraries and Services.
Last updated: Aug 03, 2026

