IDisplayPlatform

interface
Display & Responsive

Platform detection snapshot — a set of boolean flags that identify the current runtime environment (OS, browser, form factor). Exposed as `platform` on the IDisplayInstance reactive object.

TypeScript

Definition

The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

API

Properties

Every property declared by this interface, with its type, optionality and default.

android
required
boolean
True when the UA suggests an Android device.
ios
required
boolean
True when the UA suggests an iOS device.
cordova
required
boolean
True when running inside a Cordova/Capacitor shell.
electron
required
boolean
True when running inside Electron.
chrome
required
boolean
True when the UA is Chromium-based.
edge
required
boolean
True when the UA is Microsoft Edge.
firefox
required
boolean
True when the UA is Firefox.
opera
required
boolean
True when the UA is Opera.
win
required
boolean
True when the OS is Windows.
mac
required
boolean
True when the OS is macOS.
linux
required
boolean
True when the OS is Linux (non-Android).
touch
required
boolean
True when a primary touch input is detected.
ssr
required
boolean
True when the code runs in a server-side rendering context.

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Reading platform flags from useDisplay()

typescript