Search.../

formFactor

Gets what kind of device is being used to view the page.

Description

The formFactor property gets one of:

  • "Desktop": When viewed in a desktop browser.
  • "Mobile": When viewed in a mobile browser.
  • "Tablet": When viewed in a tablet browser.

Type:

stringRead Only

Was this helpful?

Get a device's form factor

Code Example

Copy Code
1import wixWindow from 'wix-window';
2
3// ...
4
5let formFactor = wixWindow.formFactor; // "Mobile"