1.0.0 • Published 4 years ago

@guillaumebriday/vue-scroll-progress-bar v1.0.0

Weekly downloads
153
License
MIT
Repository
-
Last release
4 years ago

vue-scroll-progress-bar

Donate npm.io npm.io npm.io npm.io Netlify Status

Getting started

Install

$ npm install @guillaumebriday/vue-scroll-progress-bar --save

or

$ yarn add @guillaumebriday/vue-scroll-progress-bar

Install the plugin into Vue:

import Vue from 'vue'
import VueScrollProgressBar from '@guillaumebriday/vue-scroll-progress-bar'

Vue.use(VueScrollProgressBar)

Or use the component directly:

import { VueScrollProgressBar } from '@guillaumebriday/vue-scroll-progress-bar'

export default {
  components: {
    VueScrollProgressBar
  },

  // ...
}

Basic Usage

<template>
  <vue-scroll-progress-bar @complete="handleComplete" height="2rem" />
</template>

Props

keydescriptiondefault
heightHeight of the progress bar'.5rem'
backgroundColorBackground property of the progress bar'linear-gradient(to right, #38C172, #51D88A)'
barClassClass attribute of the progress bar'{}'
containerColorBackground property of the progress bar container'transparent'
zIndexz-index property of the progress bar container'50'
containerClassClass attribute of the progress bar container'{"progress-bar-container--container": true}'

With :

.progress-bar-container--container {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
}

containerClass must be used to override the .progress-bar-container--container default class. You can use the default :class syntax on the component to add classes if needed.

Events

keydescription
beginWhen scroll reached 0%
completeWhen scroll reached 100%

Develop

Project setup

$ yarn install
$ yarn build

Open example app

$ cd example
$ yarn
$ yarn serve

Lint files

$ yarn lint

Contributing

Do not hesitate to contribute to the project by adapting or adding features ! Bug reports or pull requests are welcome.

License

This project is released under the MIT license.

1.0.0

4 years ago

0.5.0

5 years ago

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.0

5 years ago

0.2.0

6 years ago

0.1.0

6 years ago