How To Create HTML5 Canvas Range Slider With JavaScript | CanvasSlider

CanvasSlider is a lightweight JavaScript range slider. Most of the Range Slider controls use JS and a stylesheet.

This slider uses the HTML5 canvas element to draw a scroll bar without the need for a style sheet. It is easy to maintain and provides a lot of flexibility.

Key Features:

  • Number formatting.
  • Supports a number of drag handles.
  • Custom deal with shapes.
  • Optional ticks, labels, tooltips, and worth-packing containers.
  • No CSS is required.

How to make use of it:

1. Download the package deal and place the JavaScript canvasslider.js on the backside of the web page.

<script src="canvasslider.js"></script>

2. Create an HTML5 canvas factor on which you wish to render a variety slider.

<canvas id="mySlider" title="My Slider"></canvas>

3. Initialize the varied slider and executed it.

var mySlider = new CanvasSlider({
     canvas: "mySlider",
     range: min: 0, max: 80.4, count: 5,
     start: [40.6],
     snapToTicks: true,
     showLabels: true,
     showMajorTicks: true,
     showMinorTicks: false,
     showToolTip: true,
     showValueBox: false,
     format: {decimals: 0, prefix: "€ ", suffix: ""},
     handle: ,
     baseColor: {h: 207, s: 60, v: 100}
});

Latest Free Range Slider JavaScript/CSS Libraries, Range Slider with Input Box, Canvas Slider Plugin/Github


See Demo And Download

Official Website(akalverboer): Click Here

This superior jQuery/javascript plugin is developed by akalverboer. For extra Advanced usage, please go to the official website.

Share