Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Nouislider | 5,384 | 1,399 | 307 | 4 months ago | 53 | August 12, 2022 | 29 | mit | TypeScript | |
noUiSlider is a lightweight, ARIA-accessible JavaScript range slider with multi-touch and keyboard support. It is fully GPU animated: no reflows, so it is fast; even on older devices. It also fits wonderfully in responsive designs and has no dependencies. | ||||||||||
Ion.rangeslider | 2,532 | 2 months ago | 131 | mit | JavaScript | |||||
jQuery only range slider | ||||||||||
Flutter_app | 2,417 | 3 months ago | 9 | apache-2.0 | Dart | |||||
🔥🔥🔥本项目包括各种基本控件使用(Text、TextField、Icon、Image、Listview、Gridview、Picker、Stepper、Dialog、Slider、Row、Appbar、Sizebox、BottomSheet、Chip、Dismissible、FlutterLogo、Check、Switch、TabBar、BottomNavigationBar、Sliver等)、豆瓣电影、tubitv、每日一文、和天气、百姓生活、随机诗词、联系人、句子迷、好奇心日报、有道精品课、高德定位、音乐播放器🎵、追书神器等板块 | ||||||||||
Vue Slider Component | 2,292 | 394 | 223 | 6 months ago | 195 | July 28, 2022 | 24 | mit | TypeScript | |
🌡 A highly customized slider component | ||||||||||
Rangeslider.js | 2,162 | 131 | 14 | 8 months ago | 26 | October 06, 2019 | 74 | mit | JavaScript | |
🎚 HTML5 input range slider element polyfill | ||||||||||
React Slider | 815 | 319 | 97 | 5 days ago | 47 | May 16, 2022 | 15 | mit | JavaScript | |
Accessible, CSS agnostic, slider component for React. | ||||||||||
Nmrangeslider | 731 | 31 | 3 years ago | 3 | March 24, 2015 | 42 | mit | Objective-C | ||
A custom range slider for iOS | ||||||||||
React Input Range | 705 | 601 | 124 | a year ago | 33 | January 06, 2018 | 125 | mit | JavaScript | |
React component for inputting numeric values within a range (range slider) | ||||||||||
React Rangeslider | 620 | 390 | 111 | 8 months ago | 16 | September 19, 2017 | 92 | mit | JavaScript | |
A lightweight responsive react range slider component.A fast & lightweight react component as a drop in replacement for HTML5 input range slider element. | ||||||||||
Deskapp | 595 | a month ago | 2 | July 03, 2020 | mit | HTML | ||||
DeskApp Admin is a free to use Bootstrap 4 admin template. |
A fast & lightweight react component as a drop in replacement for HTML5 input range slider element.
Using npm
(use --save
to include it in your package.json)
$ npm install react-rangeslider --save
Using yarn
(this command also adds react-rangeslider to your package.json dependencies)
$ yarn add react-rangeslider
React-Rangeslider is bundled with a slider component & default styles which can be overridden depending on your design requirements.
With a module bundler like webpack that supports either CommonJS or ES2015 modules, use as you would anything else:
// Using an ES6 transpiler like Babel
import Slider from 'react-rangeslider'
// To include the default styles
import 'react-rangeslider/lib/index.css'
// Not using an ES6 transpiler
var Slider = require('react-rangeslider')
The UMD build is also available on unpkg:
<script src="https://unpkg.com/react-rangeslider/umd/rangeslider.min.js"></script>
You can find the library on window.ReactRangeslider
. Optionally you can drop in the default styles by adding the stylesheet.
<link rel="stylesheet" href="https://unpkg.com/react-rangeslider/umd/rangeslider.min.css" />
Check out docs & examples.
import React, { Component } from 'react'
import Slider from 'react-rangeslider'
class VolumeSlider extends Component {
constructor(props, context) {
super(props, context)
this.state = {
volume: 0
}
}
handleOnChange = (value) => {
this.setState({
volume: value
})
}
render() {
let { volume } = this.state
return (
<Slider
value={volume}
orientation="vertical"
onChange={this.handleOnChange}
/>
)
}
}
Rangeslider is bundled as a single component, that accepts data and callbacks only as props
.
import Slider from 'react-rangeslider'
// inside render
<Slider
min={Number}
max={Number}
step={Number}
value={Number}
orientation={String}
reverse={Boolean}
tooltip={Boolean}
labels={Object}
handleLabel={String}
format={Function}
onChangeStart={Function}
onChange={Function}
onChangeComplete={Function}
/>
Prop | Type | Default | Description |
---|---|---|---|
min |
number | 0 | minimum value the slider can hold |
max |
number | 100 | maximum value the slider can hold |
step |
number | 1 | step in which increments/decrements have to be made |
value |
number | current value of the slider | |
orientation |
string | horizontal | orientation of the slider |
tooltip |
boolean | true | show or hide tooltip |
reverse |
boolean | false | reverse direction of vertical slider (top-bottom) |
labels |
object | {} | object containing key-value pairs. { 0: 'Low', 50: 'Medium', 100: 'High'}
|
handleLabel |
string | '' | string label to appear inside slider handles |
format |
function | function to format and display the value in label or tooltip | |
onChangeStart |
function | function gets called whenever the user starts dragging the slider handle | |
onChange |
function | function gets called whenever the slider handle is being dragged or clicked | |
onChangeComplete |
function | function gets called whenever the user stops dragging the slider handle. |
To work on the project locally, you need to pull its dependencies and run npm start
.
$ npm install
$ npm start
Feel free to contribute. Submit a Pull Request or open an issue for further discussion.
MIT