0.3.1 • Published 4 years ago

vue-potentiometer v0.3.1

Weekly downloads
27
License
MIT
Repository
github
Last release
4 years ago

JS potentiometer written using Vue.js

This project provide a responsive Javascript potentiometer input written in Vue.js.

You can find a demo here.

Getting started

Install the vue module :

npm install vue-potentiometer

Add the module in your application :

import potentiometer from 'vue-potentiometer';

export default {
    components: { potentiometer },
    // ...
}

And then add the potentiometer stylesheet :

@import "~vue-potentiometer/dist/potentiometer.css";

Parameters

  • disable-axis-x: Disable mouse X axis value control.
  • disable-axis-y: Disable mouse Y axis value control.
  • display-input: Display potentiometer number input.
  • min: Configure potentiometer min value.
  • mark-step: Configure values the dash-marks will be placed on.
  • max: Configure potentiometer max value.
  • low-value-gap: Configure a percent on the bottom of the potentiometer which doesn't have value and marks and cannot be selected.
  • precision: Configure value float precision (ex: 0.1 for values like 12.3).
  • sensibility: potentiometer sensibility.

All parameters are optional, default values setted here, except for the false by default display-input, disable-axis-x and disable-axis-y :

<!-- ... -->
<Potentiometer
    disable-axis-x
    disable-axis-y
    display-input
    :min="-100"
    :mark-step="20"
    :max="100"
    :low-value-gap="0.1"
    :precision="1"
    :sensibility="10" />
<!-- ... -->

Alternative

If you don't want to add the potentiometer stylesheet, you can also include the potentiometer vue object directly. But be careful, it uses scss language, you should install node-sass and sass-loader npm packages :

import potentiometer from 'vue-potentiometer/potentiometer';

// ...

Examples

0.3.1

4 years ago

0.3.0

4 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago