@mapbox/page-loading-indicator

0.1.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @mapbox/page-loading-indicator

Weekly Downloads

0

Version

0.1.0

License

SEE LICENSE IN LICENSE_Mapbox

Last publish

Collaborators

  • mbx-npm-ci-production
  • mbx-npm-ci-staging
  • mbx-npm-advanced-actions-production
  • mbx-npm-advanced-actions-staging
  • mbx-npm-09-production
  • mbx-npm-08-production
  • mbx-npm-07-production
  • mbx-npm-06-production
  • mbx-npm-05-production
  • mbx-npm-04-production
  • mbx-npm-03-production
  • mbx-npm-02-production
  • mbx-npm-01-production
  • mbx-npm-02-staging
  • mapbox-npm-01
  • mapbox-npm-02
  • mapbox-npm-07
  • mapbox-npm-03
  • mapbox-npm-04
  • mapbox-npm-09
  • mapbox-npm-05
  • mapbox-npm-06
  • mapbox-npm-08
  • mapbox-npm-advanced-actions
  • mapbox-npm-ci
  • mapbox-npm
  • mapbox-admin
  • mapbox-machine-user