brightness.system
Whether the system controls brightness: the app hasn't set a level, or restored the system's.
Usage
Restore the user's brightness when leaving a temporary bright mode.
// Restore the user's brightness when leaving a temporary bright mode.
import { Button, Text, VStack, brightness, onCleanup } from 'kuito';
export function ReadingMode() {
onCleanup(() => void brightness.restore());
return (
<VStack>
<Text>{`System brightness: ${brightness.system.value}`}</Text>
<Button onPress={() => (brightness.level.value = 0.8)}>Bright mode</Button>
<Button onPress={() => void brightness.restore()}>Use system brightness</Button>
</VStack>
);
}Properties and methods 1
| Name | Type | Required | Description |
|---|---|---|---|
valuereadonly | boolean | Yes | — |
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.