@rill/progress

Simple loading bar animation for Rill applications.

Usage no npm install needed!

<script type="module">
  import rillProgress from 'https://cdn.skypack.dev/@rill/progress';
</script>

README

Rill
@rill/progress
API stability Standard NPM version Downloads Gitter Chat

Adds a simple loading bar during requests with Rill. The progress bar is powered by nprogress.

Installation

npm install @rill/progress

Example

var app = require('rill')()
var progress = require('@rill/progress')

// All requests to the app will now have a progress bar.
app.use(progress({ speed: 500, easing: 'ease' }))

Options

{
  color: "green", // The default color of the progress bar and spinner.
  spinner: true,    // Show the spinning circle along with the bar.
  parent: "body",  // The element that will contain the progress bar.
  style: true     // Uses inline styles to create the progress bar. Set to false to use your own.
}

Styling

All styles are injected into the document when the page is loaded. You can see the unminified styles here. To use your own styles use style: false to disable the inline styles.

Contributions

  • Use npm test to run tests.

Please feel free to create a PR!