You need to sign in to do that
Don't have an account?
How to hide a Lightning Web Component (LWC) component if the current browser is mobile phone?
Hello,
I am using Progress Indicator component. But I want to hide this if user is accesing the page from mobile or tablet. What is the best way to do that? Thanks in adcance!!
( https://developer.salesforce.com/docs/component-library/bundle/lightning-progress-indicator/example)
I am using Progress Indicator component. But I want to hide this if user is accesing the page from mobile or tablet. What is the best way to do that? Thanks in adcance!!
( https://developer.salesforce.com/docs/component-library/bundle/lightning-progress-indicator/example)
Please try this code:
Aura Component
<aura:component access="global" >
{!$Browser.formFactor}
<aura:if isTrue="{!$Browser.formFactor == 'DESKTOP'}">
<c:progressBarComponent/> <!--LWC Component-->
</aura:if>
</aura:component>
I hope it helps you.
Please let me know if you have any other query and If this solution is helpful then please mark it as Best Answer.
Thanks,
Ankit Rathor