Coder Social home page Coder Social logo

leoyang92 / vue-progress-circle Goto Github PK

View Code? Open in Web Editor NEW

This project forked from keiwen/vue-progress-circle

0.0 0.0 0.0 959 KB

Circle progress bar component for Vue.js

Home Page: https://keiwen.github.io/vue-progress-circle/

JavaScript 24.09% Vue 75.91%

vue-progress-circle's Introduction

vue-progress-circle

npm npm

Circle progress bar component

Live demo here

Global use

  • npm install
npm install --save vue-progress-circle
  • import components
import { ProgressCircle } from 'vue-progress-circle'
  • declare use or imported components in your vue script
export default {
    components: { ProgressCircle },
    methods: ...
}
  • Use components as described below

Components

Progress circle

<progress-circle completed-steps="5" total-steps="10"></progress-circle>
<progress-circle :diameter="cp_diameter"
                 :completed-steps="cp_completedSteps"
                 :circle-color="cp_circleColor"
                 :start-color="cp_startColor"
                 :stop-color="cp_stopColor"
                 :circle-width="cp_circleWidth"
                 :animation-duration="cp_animationDuration"
                 :inner-color="cp_innerColor"
                 :inner-display="cp_innerDisplay"
                 :percent-color="cp_percentColor"
                 :total-steps="cp_totalSteps">
   <p>Total steps: {{ cp_totalSteps }}</p>
   <p>Completed steps: {{ cp_completedSteps }}</p>
</progress-circle>
Prop Type Note
completed-steps number REQUIRED: number of completed steps
total-steps number REQUIRED: number of total steps
diameter number (px) diameter of circle component (default 100)
circle-color String inner circle color (when no progress, default black)
start-color String leading color for progress bar (default red)
stop-color String trailing color for progress bar (default blue)
inner-color String Color inside the circle (default transparent)
circle-width number (px) circle width (default 10)
animation-duration number (ms) duration of animation when progress change (default 1000)
inner-display String Change inner circle filling. By default or 'slot', it will use provided slot (or nothing). 'Percent' will display progress percent rounded value
percent-color String Change color of progress percent if displayed (see inner-display, default inherit)

BY default, this component provide a slot where you can insert any html code to be displayed inside the circle

Contribution

  • Fork the repository
  • Run npm install
  • You can run npm run dev, site is at http://localhost:8081.
  • Do your stuff
  • When you're done, run npm run build command and commit your work for a pull request.

vue-progress-circle's People

Contributors

keiwen avatar judocode avatar dalehille avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.