@mapbox/page-loading-indicator

A Mapbox JS thing.

Stats

StarsIssuesVersionUpdatedCreatedSize
@mapbox/page-loading-indicator
0.1.04 years ago4 years agoMinified + gzip package size for @mapbox/page-loading-indicator in KB

Readme

@mapbox/page-loading-indicator

A page loading indicator you can swipe across the top of the screen while things load.

⚠️ This is not a React component!

⚠️ This must be used in combination with mapbox-assembly v0.20.0+, which includes the necessary CSS.

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.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.