Is there an equivalent to $A.get("$Browser.formFactor") in LWC?

As of today, there is a lwc module that you can import to get it:

https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.create_client_form_factor

Hope that helps


Edit Dec. 2020: Now available via @salesforce/client/formFactor import


No there is no equivalent of $Browser.formFactor Aura global value provider in LWC. The addition of an equivalent is under discussion.

For now, you can use CSS media queries and Element.getBoundingClientRect to make component adapt to the space available on the screen.