1.1.1 • Published 4 years ago
vue-reading-progress v1.1.1
vue-reading-progress
Performant reading progressbar for Vue.js
Demo
Installation
npm
npm i vue-reading-progress
yarn
yarn add vue-reading-progress
Usage
Global
import Vue from 'vue' import VueReadingProgress from 'VueReadingProgress'
Vue.component('VueReadingProgress', VueReadingProgress)
import Vue from 'vue' import VueReadingProgress from 'VueReadingProgress'
Vue.use(VueReadingProgress)
In Component
<template>
<VueReadingProgress />
</template>
<script>
import VueReadingProgress from 'vue-reading-progress'
export default {
components: {
VueReadingProgress
}
}
</script>
Props
Prop | Type | Default | Description |
---|---|---|---|
color | String | #ffbe0b | Progress bar background color (HEX, Color Name) |
height | String | 4px | Progress bar height (px, rem, %) |
opacity | Number, String | 1 | Progress bar opacity value (0 - 1) |
All props are optional
<template>
<VueReadingProgress :color="color" :height="height" :opacity="opacity" />
</template>
<script>
import VueReadingProgress from 'vue-reading-progress'
export default {
components: {
VueReadingProgress
},
data() {
return {
color: '#162447',
height: '2px',
opacity: '0.75'
}
}
}
</script>