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 #192 | Call batch apex from flow

Salesforce Fact #457 | Get current user role name in flow