2.0.1 • Published 1 year ago

vuejs3-progressbar v2.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

vuejs3-progressbar

ProgressBar for vue.js version 3 SVG/Vector based 4 modes: Line, Circle, Cylinder and Battery v1.2.8

Requirements

Nodejs: v16.20.0 npm: v8.19.4

Live demo

Do you have questions or want a new feature? Use the "Issues" section :point_left:

Setup

install:

npm install vuejs3-progressbar --save

in your main.js

import ProgressBar from 'vuejs3-progressbar';
import {createApp} from "vue";
const app = createApp()
              .component(ProgressBar)

Usage

Use: (in your local .vue file/component, html section)

<progress-bar
  :options="options"
  :value="value"
/>

<!-- Options struct: -->
options: {
  text: {
    color: '#FFFFFF',
    shadowEnable: true,
    shadowColor: '#000000',
    fontSize: 14,
    fontFamily: 'Helvetica',
    dynamicPosition: false,
    hideText: false
  },
  progress: {
    color: '#2dbd2d',
    backgroundColor: '#333333',
    inverted: false
  },
  layout: {
    height: 35,
    width: 140,
    verticalTextAlign: 61,
    horizontalTextAlign: 43,
    zeroOffset: 0,
    strokeWidth: 30,
    progressPadding: 0,
    type: 'line'
  }
}

Properties

NameTypeDefaultDescription
valueNumber0Value of progressbar %
colorString#FFFFFFText color
shadowEnableStringtrueText shadow enable
shadowColorString#000000Text shadow color
hideTextBooleanfalseHide text (%)
fontSizeString14pxFont size of % text
fontFamilyStringHelveticaFont family text
dynamicPositionBooleanfalseProgress text % follow progress bar
colorString#2dbd2dProgress color, use hex or rgb
backgroundColorString#C0C0C0Background color, use hex or rgb
invertedBooleanfalseInvert circle progress
widthNumber140Width
heightNumber35Height, use strok for progress height
verticalTextAlignNumber61Positioning of % text vertical
horizontalTextAlignNumber43Positioning of % text horizontal
zeroOffsetNumber0Offset for zero (0%) for line progress bar
strokeWidthNumber30Width of background of progress
progressPaddingNumber0Padding between background and progress bar (line only)
typeStringlinetype of progress bar: line, circle, cylinder or battery