Updated 14 October 2025
In this blog we will learn how to implement loading sign in lightning component. You can refer to the code below:
Component –
<aura:component access="global">
<ui:spinner aura:id="spinner"/>
<ui:button press="{!c.toggleSpinner}" label="Toggle Spinner" />
</aura:component>
Controller –
({
toggleSpinner: function(cmp) {
var spinner = cmp.find('spinner');
var evt = spinner.get("e.toggle");
if(!$A.util.hasClass(spinner, 'hideEl')){
evt.setParams({ isVisible : false });
}else {
evt.setParams({ isVisible : true });
}
evt.fire();
}
})
That’s all for how to implement load sign in lightning component, still have any issue feel free to add a ticket and let us know your views to make the code better https://webkul.uvdesk.com/en/customer/create-ticket/
Welcome back! Please enter your details
One or more fields have an error. Please check and try again.
Don’t have an account? Sign up
How can we help you with your business?
Be the first to comment.