Access Client Form Factor
To access the form factor of the hardware the browser is running on, import the @salesforce/client/formFactor scoped module.
formFactorPropertyName—A name that refers to the form factor of the hardware running the browser. Possible values are:Large—A desktop client.Medium—A tablet client.Small—A phone client.
Pass the form factor to the getRecordCreateDefaults wire adapter to get the default layout and object information for creating a record.
You can use @salesforce/client/formFactor in a TypeScript file. This scoped module corresponds to the client.d.ts type definition in the @salesforce/lightning-types npm package.
See Also