1, Icon:

The URL to the loader image. This image is displayed when the widget is active; that is, between the ajaxSend and ajaxComplete events.

Type: String

Default value: No image by default.

2, Template

HTML wrapper for the output, or a DOM element selector.

Default value:

1

2

3

4

5

6

'<div class="loading-mask" data-role="loader">'+

'<div class="loader">'+

'<img alt="<%-data.texts.imgAlt%>" src="<%-data.icon%>">'+

'<p><%-data.texts.loaderText%></p>'+

'</div>'+

'</div>'

3, Texts

An object that contains translations for loader text:

texts.loaderText: The text that is displayed under the loader image.

Default value: ‘Please wait…’

texts.imgAlt: The text that is set as the alt attribute value of the loader image.

Default value: ‘Loading…’

Events

processStart: Display the loader. Can be triggered on any page element.

processStop: Hide the loader. Can be triggered on any page element.

The steps I mention above is the shortest process for you to Loader Widget in Magento 2 . With this guide, you can manage the Loader Widget in Magento 2 easily. Every store has a Loader Widget in Magento 2 with many attributes.

Thank you for reading this post and see you in other posts from Magestore!