react-native-screen-brightness
v2.0.0-alpha
Published
Screen brightness module for iOS & Android on React Native
Downloads
14,416
Readme
react-native-screen-brightness
Access and update the system brightness on a device.
React Native compatibility
| React Native version | Compatible react-native-screen-brightness
version |
| :------------------: | :------------------: |
| v0.60+ | v2.x |
| v0.27 - v0.59 | v1.x |
Install
yarn add react-native-screen-brightness
npm i --save react-native-screen-brightness
Example
import ScreenBrightness from 'react-native-screen-brightness';
ScreenBrightness.setBrightness(0.5); // between 0 and 1
ScreenBrightness.getBrightness().then(brightness => {
console.log('brightness', brightness);
});