All Projects → maslick → radiaSlider

maslick / radiaSlider

Licence: MIT License
circular/linear knob-style slider

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to radiaSlider

Mscircularslider
A fully-featured, powerful circular slider for iOS applications
Stars: ✭ 94 (+422.22%)
Mutual labels:  slider, circular
downscale
Better image downscale with canvas.
Stars: ✭ 80 (+344.44%)
Mutual labels:  canvas, linear
Circular Audio Wave
JS library for audio visualization in circular wave using Web Audio API and ECharts
Stars: ✭ 131 (+627.78%)
Mutual labels:  canvas, circular
rn-circular-slider
React Native circular slider based on react-native-svg
Stars: ✭ 25 (+38.89%)
Mutual labels:  slider, circular
Jocircularslider
A highly customisable and reusable circular slider for iOS applications.
Stars: ✭ 128 (+611.11%)
Mutual labels:  slider, circular
Hgcircularslider
A custom reusable circular / progress slider control for iOS application.
Stars: ✭ 2,240 (+12344.44%)
Mutual labels:  slider, circular
KJCircularSlider
Slide circularly. Soon more extended version about to come!
Stars: ✭ 23 (+27.78%)
Mutual labels:  slider, circular
is-safe-integer
ES2015 Number.isSafeInteger() ponyfill
Stars: ✭ 16 (-11.11%)
Mutual labels:  npm-package
react-native-value-picker
Cross-Platform iOS(ish) style picker for react native.
Stars: ✭ 18 (+0%)
Mutual labels:  npm-package
couchbase-index-manager
Command-line interface to manage Couchbase indexes, synchronizing them to index definitions.
Stars: ✭ 14 (-22.22%)
Mutual labels:  npm-package
height-slider
A customisable height slider for Flutter.
Stars: ✭ 15 (-16.67%)
Mutual labels:  slider
randoma
User-friendly pseudorandom number generator (PRNG)
Stars: ✭ 103 (+472.22%)
Mutual labels:  npm-package
basicSlider
A slider in its purest form.
Stars: ✭ 27 (+50%)
Mutual labels:  slider
react-native-big-slider
🎚️ Yet another, big one, pure JS easily customisable and hackable react-native slider component
Stars: ✭ 86 (+377.78%)
Mutual labels:  slider
canvas2video
canvas2video is a backend solution for creating and rendering dynamic videos.
Stars: ✭ 194 (+977.78%)
Mutual labels:  canvas
fritz-box
📦 Promise-based JavaScript FRITZ!Box API.
Stars: ✭ 14 (-22.22%)
Mutual labels:  npm-package
github-profile-card
Simple and easy to use widget with your GitHub profile — No dependencies
Stars: ✭ 98 (+444.44%)
Mutual labels:  npm-package
ACBRadialCollectionView
An extension on UICollectionView which automatically transforms collection view cells to a radial path
Stars: ✭ 31 (+72.22%)
Mutual labels:  circular
kladi
Easy to use state management library for React
Stars: ✭ 24 (+33.33%)
Mutual labels:  npm-package
flappy-bird
🐦 A clone of a famous game, the Flappy Bird, made in Javascript and HTML Canvas API.
Stars: ✭ 37 (+105.56%)
Mutual labels:  canvas

=radiaSlider=

npm (scoped) Build Status npm bundle size (minified) npm no dependencies npm download count License: MIT

a pure JavaScript circular/linear knob-style slider

Features

 * works on desktop, mobile and tablets
 * small size (minified ~5 Kb)
 * no dependencies
 * pure JavaScript (ES6)
 * browser and Node.js friendly

screenshot

Demo

Circular / linear / react.js

Quickstart

  • create a canvas and the value field
<canvas id="myCanvas" width="300" height="300"></canvas>
<span id="value1"></span>

Circular slider

  • import js
<script src="slider-circular.min.js"></script>
  • initialize a slider
<script>
  const slider = new Slider({ canvasId: "myCanvas", continuousMode: true, x0: 150, y0: 150, readOnly: false });
  slider.addSlider({
    id: 1,
    radius: 50,
    min: 0,
    max: 30,
    step: 5,
    color: "#104b63",
    changed: function (v) {
      document.getElementById('value1').innerHTML = "Angle: " + v.deg + " deg, value: " + v.value;
    }
  });
</script>

Linear slider

  • import js
<script src="slider-linear.min.js"></script>
  • initialize a slider
<script>
  const slider = new Slider({ canvasId: "myCanvas",  continuousMode: true,  vertical: false, readOnly: false });
  slider.addSlider({
    id: 1
    width: 50,
    min: 0,
    max: 30,
    step: 5,
    color: "#104b63",
    changed: function (v) {
      document.getElementById('value1').innerHTML = "Width: " + v.width + " px, value: " + v.value;
    },
    x0: 30,
    y0: 30
  });
</script>

Get/set value programmatically

If you want to change the value programmatically, use:

slider.setSliderValue(<sliderId>, <value>);

To get the current value:

slider.sliders[<sliderId>].normalizedValue     // current value
slider.sliders[<sliderId>].ang_degrees         // current angle in degrees (circular only)
slider.sliders[<sliderId>].endAngle            // current angle in radians (circular only)
slider.sliders[<sliderId>].value               // current width in pixels  (linear only)

alt tag

Using Node.js

Radia slider can be used either in the Browser or in the Node.js environment.

// ES6 syntax
import CircularSlider from "@maslick/radiaslider";
import LinearSlider from "@maslick/radiaslider/src/slider-linear";

// Node.js syntax
const CircularSlider = require("@maslick/radiaslider");
const LinearSlider = require("@maslick/radiaslider/src/slider-linear");

const circular = new CircularSlider({...});
const linear = new LinearSlider({...});

For a React.js example check out this project.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].