Create Mobile-Ready Components

Create Mobile-Ready Components

Build components that perform well across mobile experiences. These guidelines are best practices, not universal rules. Consider them carefully, but don’t be afraid to go your own way if there are compelling reasons in specific situations.


Understand Mobile Development for Lightning Web Components

The best way to start building mobile-ready components is to deep dive into Lightning Web Components first.


Use Built-In Mobile Tools and Features

Before you write code for your users on mobile devices, configure your environment and use built-in mobile-ready tools and features.


Minimize Bandwidth Usage

Since mobile users have network constraints, consider bandwidth on mobile devices when building your components.


Create Responsive Layouts

For a responsive, mobile-first app, create layouts using the grid system.


Follow Accessible Mobile Design Guidelines

Before you build and test your components on a mobile screen, follow best practices for making your designs accessible.


Disable Pull-to-Refresh in the Salesforce Mobile App

Disable pull-to-refresh on pages where accidentally triggering it can cause loss of data in the Salesforce mobile app. Disabling pull-to-refresh is as simple as firing a?CustomEvent. Fire this event in your own components, or create a component you can use throughout your Salesforce org.


Source: https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.mobile

要查看或添加评论,请登录

Tuba Y.的更多文章

社区洞察

其他会员也浏览了