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

Définition

La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.

typescript

API

Propriétés

Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.

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

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

Extraits de code prêts à coller utilisant cette interface.

Reading platform flags from useDisplay()

typescript