0.1.0 • Published 7 years ago

@mapbox/page-loading-indicator v0.1.0

Weekly downloads
7
License
SEE LICENSE IN LI...
Repository
github
Last release
7 years ago

@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.