@mapbox/page-loading-indicator
A page loading indicator you can swipe across the top of the screen while things load.
Installation
npm install @mapbox/page-loading-indicator
API
start
pageLoadingIndictor.start()
Adds the indicator to the DOM and slides it into view.
end
pageLoadingIndictor.end(): Promise<void>
Slides the indicator out of view and removes it from the DOM. Returns a Promise that resolves when the indicator has been destroyed.
This will only happen after enough delay for the start
animations to complete.
So the indicator should always appear for a minimum of about half a second.