Create Side Sliders Input Values Using Mouse Drag | Pointer Lock

HTML Range Slider is a lightweight library to create side sliders to adjust values easily and precisely by making use of the Pointer Lock API.

Side Slider is a JavaScript library that allows you to adjust input values by dragging the sides of the input box. The input value will decrease and increase based on the movement of the mouse over time.

Must Read: Mouse Pointer Click Effect Javascript Plugin | Mouse.Js

Sliders Input Values Using Mouse Drag

Post NameInput Range Slider
Author Namequrafi
CategoryDraggable, Form Plugins
Official PageClick Here
Publish DateSeptember 11, 2020
Last UpdateAugust 13, 2023
DownloadLink Below

How to make use of it:

1. Load the JavaScript sideslider.js within the HTML.

<script src="/dist/sideslider.js"></script>

2. Create a number of inputs on the web page.

<input type="number" id="example" />

3. Initialize the side slider on the number input.

new SideSlider(document.getElementById('example'), {
    // options here

4. Set the min/max values allowed within the number input.

new SideSlider(document.getElementById('example'), {
    min: 0,
    max: 100

5. Set the step size.

new SideSlider(document.getElementById('example'), {
    step: 5

6. Set the width of the draggable area.

new SideSlider(document.getElementById('example'), {
    width: 5

7. Trigger a function each time you modify the value.

new SideSlider(document.getElementById('example'), {
    onChange: function (e) {
      // e.value : Current value.
      // e.prev: Previous value.
      // Difference between the current and previous value.
      // e.slider: All configurations are stored in this object.
      // The target HTMLElement.

See Demo And Download


Official Website(mhmd-22): Click Here

This superior jQuery/javascript plugin is developed by mhmd-22. For extra Advanced Usage, please go to the official website.

Related Posts


Google Translate Dropdown Customize With Country Flag | GT API

Flag google translates jQuery text that takes advantage of the Google Cloud Translation API to translate web content between languages by selecting a country from the dropdown…


HTML 5 File Input Optimized for Bootstrap 4.x./3.x with File Preview | Bootstrap Fileinput

bootstrap-fileinput is an improved HTML 5 file input  Bootstrap 5.x, 4.x and 3.x with file preview for different files, provides multiple selections, resumable section uploads, and more….


CSS Layout Components Horizontal/Vertical Stack | HStack and VStack

HStack and VStack in CSS – CSS layout components that (basically) stack anything horizontally and vertically. A pure CSS library that makes it easy to stack elements…


How to Add Floating Whatsapp Chat Button In HTML | venom-button

Venom Button is a very simple plugin for the jQuery floating WhatsApp button. Adds a floating button to your site that calls WhatsApp Click to Chat API. It will automatically start the WhatsApp…


Interactive Data Table Generator with JS/jQuery and JSON | Tabulator

Tabulator allows you to create interactive tables in seconds from any HTML Table, JavaScript array, AJAX data source, or JSON format data. Just include the library in your…


Simple Alert, Confirm, Prompt Popup Using Vanilla JavaScript Library | attention.js

JavaScript provides various built-in functionality to display popup messages for different purposes. Attention JS is a vanillaJS plugin used to create a custom alert, confirm, or Prompt…

Leave a Reply

Your email address will not be published. Required fields are marked *