Salesforce Fact #486 | Client form factor in LWC

To detect the form factor of the hardware the browser is running on, we can import @salesforce/client/formFactor scoped module in LWC.

The possible values are:

Large - A desktop client.

Medium - A tablet client.

Small - A phone client.

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

Comments

Popular posts from this blog

Salesforce Fact #218 | Blank picklist value is actually NULL

Salesforce Fact #929 | Nth highest in screen flow

Salesforce Fact #989 | New delete files permission