> ## Documentation Index
> Fetch the complete documentation index at: https://docs.median.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Screen brightness

> Set the device screen brightness from your website with the JavaScript Bridge, restore it on navigation, or reset it to the system setting.

The Screen Brightness JavaScript Bridge method lets you set the device's screen brightness at runtime, overriding the user's system setting while they're inside your app. It's part of Median's [device screen control](https://docs.median.co/docs/device-screen-control) feature set, alongside [Keep screen on](https://docs.median.co/docs/keep-screen-on.md) and [Full screen](https://docs.median.co/docs/full-screen.md).

## Why use screen brightness

* **Low-light and night reading modes**: Automatically dim the screen for reading, news, or ebook apps so brightness matches your app's own dark mode or a scheduled "night" experience.
* **Camera-driven flows**: Boost brightness before opening a barcode, QR, or document scanning flow so the camera has enough light to focus and capture accurately.
* **Photo and video accuracy**: Raise brightness when displaying photos, videos, or color-critical content so users see true colors and detail instead of a dimmed system setting.
* **Kiosk and presentation displays**: Lock brightness at maximum for outward-facing kiosk, signage, or in-store display use cases where the screen must stay clearly visible.
* **Battery-conscious experiences**: Lower brightness during long-running sessions like maps, tracking, or background-heavy screens to help conserve battery.
* **User-controlled accessibility**: Expose an in-app brightness slider so users can fine-tune brightness to their needs without leaving your app to use system controls.

> [!TIP]
>
> **Test  with our demo page**
>
> We host a ready-made demo page at
>
> that calls the  features through the Median JavaScript Bridge.
> Load it inside your Median app during development, either by setting it
> as your app's website URL in App Studio or by navigating to it from your
> own site, and use it to confirm  works on a real device before
> you add it to your own pages.
>
> The demo page only works inside a Median app with  enabled.
> Opened in a regular mobile or desktop browser, the native features
> won't respond. Remember to switch your app back to your own URL before
> release.

## JavaScript Bridge implementation

### Set screen brightness

Sets the device screen to a specific brightness level.

Median JavaScript Bridge

```javascript JavaScript theme={null}
median.screen.setBrightness({'brightness':'0.8'});
```

### Restore brightness on navigation

To apply a brightness change that automatically reverts once the user navigates to a new page:

Median JavaScript Bridge

```javascript JavaScript theme={null}
median.screen.setBrightness({'brightness':'0.8', 'restoreOnNavigation': true});
```

### Reset to default brightness

To clear any brightness override and return control to the device's system setting:

Median JavaScript Bridge

```javascript JavaScript theme={null}
median.screen.setBrightness({'brightness':'default'});
```


## Related topics

- [Device screen control](https://docs.median.co/docs/device-screen-control.md)
- [Keep screen on](https://docs.median.co/docs/keep-screen-on.md)
- [Bubble plugin](https://docs.median.co/docs/bubble-plugin.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.