function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sai harishsai harish 

Is it possible to hide a Lightning Component in quick action button to show up only in mobile and not in Lightning ?

Hi,
I have a Lightning component which I am using in a action button. I want to use the button only for mobile as I already have a visualforce Page for Lightning. Is it possible to show the action button only for mobile and hide it in Lightning ?

Thanks in advance. 
Sai.
NagendraNagendra (Salesforce Developers) 
Hi Sai,

Conditionally hide button/quick action in Lightning experience

The first step, create UI: button
<ui:button label="test" press="{!c.doAction}" aura:id="myButton"/>
Next step, add to the controller
({ doAction : function(component, event, helper) { var button = component.find("myButton"); $A.util.addClass(button.getElement(), 'invisible'); ... code }, })
And you can add a new class in STYLE
THIS .uiButton.invisible { display: none; }
Related Salesforce Documentation: Adding and Removing Styles (during runtime)- Please let us know if you are looking for something else.

Regards,
Nagendra.