npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-circle-control-slider

v1.0.7

Published

Circle Control Slider component for Vue.js based on svg view

Downloads

25

Readme

VueCircleControlSlider

It is Circle Control Slider component for Vue.js based on SVG view.

Table of contents

Installation

npm install --save vue-circle-control-slider

Usage

adding into main.js (global registration)

import Vue from 'vue'
import VueCircleControlSlider from 'vue-circle-control-slider'
import 'vue-circle-control-slider/dist/VueCircleControlSlider.css'
Vue.component('VueCircleControlSlider', VueCircleControlSlider); //global registration

or adding into your vue component (local registration)

<script>
import VueCircleControlSlider from 'vue-circle-control-slider'
export default{
    //*...some code...*//
    components: {
        //*...other components...*//
        VueCircleControlSlider //local registration in your component
    }
}
</script>

Functionality

  • svg based view
  • 2 way binding data value
  • defining min & max values
  • defining step size
  • animation while updating to new value on click by circle
  • touch devices support (touchmove)
  • available disabled events
  • sizes customization: exact and relative definitions
  • colors customization

Examples

When you have been register component with name VueCircleControlSlider so you can just use it right away:

...
<vue-circle-control-slider :value="pushSomeValue"/>
<vue-circle-control-slider @value="receiveSomeValue"/>
...

or customize some properties:

...
<vue-circle-control-slider
  :size="300"
  :min="0"
  :max="100"
  circleColor="black"
  progressColor="red"
  :knobRadius="20"
  :progressWidth="10"
  dial
  sign="%"
  dialTextColor="red"
/>
...

Interface

Props

| Props | Type | Default | Description | | ---------------- |:--------------| ---------|--------------| | value | Number | 0 | init start value | | size | Number | 200 | sets svg width & heigth | | dial | Boolean | false | show value inside circle center | | dialTextColor | String | black | sets color of dial value inside circle center | | dialFontSize | Number | 50 | sets font-size of dial | sign | String | "" | add sign to the end value row inside circle center for exampe it's "%" add persent sign | | min             | Number       | 0 | sets the minimum value | | max | Number | 100 | sets the maximum value | | startAngleOffset | Number | 90 | sets angle offset | | offKnob | Boolean | false | remove circle knob | | offKnobNumber | Boolean | false | remove value in circle knob | | knobColor | String | white | sets knob color (unless explicitly stated, the props is the same as progressColor ) | | knobTextColor | String | black | sets knob text color | | knobBorderColor | String | #2196F3| knob border color (unless explicitly stated, the props is the same as progressColor ) | | knobBorderWidth | Number | 3 | sets knob border with in px | | knobRadius | Number | 18 | sets knob radius in px | | progressWidth | Number | 8 | sets width of circle progress in px | | progressColor | String | #2196F3| sets color of circle progress curve | | circleWidth | Number | 6 | sets width of circle border in px | | circleColor | String | #9E9E9E| sets border color of circle | | stepSize | Number | 1 | sets the gap between the values | | ms | Number | 500 | sets the duration of the animation | | disabled | Boolean | false | desabled events |

Slots

There is no any slots available

Demo

License

MIT