Navigator: devicePosture property

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The Navigator.devicePosture read-only property returns the browser's DevicePosture object, which allows developers to query the device's current posture (that is, whether the viewport is in a flat or folded state) and run code in response to posture changes.

Value

A DevicePosture object.

Examples

js
const postureOutput = document.getElementById("currentPosture");

function reportPostureOutput() {
  // type property returns "continuous" or "folded"
  postureOutput.textContent = `Device posture: ${navigator.devicePosture.type}`;
}

navigator.devicePosture.addEventListener("change", reportPostureOutput);

Specifications

Specification
Device Posture API
# dom-navigator-deviceposture

Browser compatibility

desktop mobile server
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Node.js
devicePosture
Experimental
Chrome – Full support
Chrome 132 (Release date: 2025-01-14)
footnote Full support
Edge – Full support
Edge 132 (Release date: 2025-01-17)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 117 (Release date: 2025-02-13)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 132 (Release date: 2025-01-14)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 87 (Release date: 2025-01-22)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 16.2 (Release date: 2022-03-06)
footnote Full support
WebView Android – Full support
WebView Android 132 (Release date: 2025-01-14)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
Node.js – No support
Node.js
footnote No support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Experimental. Expect behavior to change in the future.

See also