1.1.4 • Published 3 years ago

vue-cobra v1.1.4

Weekly downloads
78
License
MIT
Repository
github
Last release
3 years ago

vue-cobra

A Vuejs component that indicates the position of the scroll as the user reads the page.

Install

npm

npm install vue-cobra --save

yarn

yarn add install vue-cobra

Usage

Default

<template>
  <div>
    <vue-cobra />
  </div>
</template>

<script>
  import vueCobra from "vue-cobra";
  export default {
    name: "Demo",
    components: {
      vueCobra,
    },
  };
</script>

With custom properties

<template>
  <div>
    <vue-cobra
      :height="10"
      :zIndex="900"
      color="#4fc08d"
      :opacity="0.5"
      position="left"
    />
  </div>
</template>

<script>
  import vueCobra from "vue-cobra";

  export default {
    name: "Demo",
    components: {
      vueCobra,
    },
  };
</script>

Register it globally

import Vue from "vue";
import vueCobra from "vue-cobra";

Vue.component("vue-cobra", vueCobra);

Options / Props

PropTypeDefault valueRequiredDescription
colorString#000falseSet progress bar background color
heightNumber4falseSet height of progress bar
opacityNumber1falseSet opacity from 0 to 1
positionStringtopfalseDefine in which position the bar will be rendered. Accepts: top, bottom and left
zIndexString1000falseSet value based on css z-index property

When position property is set, height value is used to define the tickness of the bar. This was a quick approach to ensure backward compatibility. Feel free to send a PR.

Contributors

@phfontess @fvonellerts

Acknowledgement

Diogo Moretti - React Snakke

License

MIT © Firmino Changani

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.8

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago