Socket
Socket
Sign inDemoInstall

@baianat/rangeslider

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@baianat/rangeslider

ES6 rangeslider


Version published
Weekly downloads
4
increased by300%
Maintainers
2
Weekly downloads
 
Created
Source

Range sldier

ES6 range slider

key features

  • Build using ES6 classes
  • Lightweight
  • Easy customizing
  • gradient slider with update color value

example

How to use

include necessary files

<head>
  <link rel="stylesheet" href="dist/css/slider.css">
</head>
<body>
    ...
    <script type="text/javascript" src="dist/js/slider.js"></script>
</body>

HTML markup

you need an input to output the value in it

<input id="slider-1">

<script>
  let s1 = new Slider('#slider-1', {
    gradient: ['#FFE344', '#38E4B7'],
    min: 0,
    max: 100,
    step: 1,
    value: 60
  });
</script>

you can also add value, min, max and step value using input attributes

<input id="slider-2"  min="-10" max="10" value="0" step="1">

<script>
  let s2 = new Slider('#slider-2');
</script>

Settings

Propertiesdefaultdescription
gradientnullslider gradient array color
classesnullclasses to add to range slider
colorCodefalseshow color code istead of value
editablefalsecan input the slider value directly
labeltrueshow/hide value label
min0minimum slider value
max10maximm slider value
step1limit the increments value
value0start value

License

MIT

Copyright (c) 2017 Baianat

FAQs

Package last updated on 10 Nov 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc