All Projects → M-Izadmehr → React Slider Kit

M-Izadmehr / React Slider Kit

Licence: mit
react-slider-kit is going to be a comprehensive solution to slider feature in react.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Slider Kit

range-slider
Customizable slider (range) component for JavaScript with no dependencies
Stars: ✭ 26 (-88.13%)
Mutual labels:  slider, range, range-slider
vue-histogram-slider
Range slider with histogram for Vue.js
Stars: ✭ 111 (-49.32%)
Mutual labels:  slider, range, range-slider
React Slider
Accessible, CSS agnostic, slider component for React.
Stars: ✭ 627 (+186.3%)
Mutual labels:  slider, range, range-slider
Ion.rangeslider
jQuery only range slider
Stars: ✭ 2,494 (+1038.81%)
Mutual labels:  slider, range, range-slider
Vue Slider Component
🌡 A highly customized slider component
Stars: ✭ 2,158 (+885.39%)
Mutual labels:  slider, range-slider
Rangeseekbar
A beautiful and powerful SeekBar what supports single、 range、steps、vetical、custom( 一款美观强大的支持单向、双向范围选择、分步、垂直、高度自定义的SeekBar)
Stars: ✭ 2,037 (+830.14%)
Mutual labels:  slider, range
Rangetouch
A super tiny library to make `<input type='range'>` sliders work better on touch devices
Stars: ✭ 224 (+2.28%)
Mutual labels:  slider, range
TimeRangePicker
A customizable, easy-to-use, and functional circular time range picker library for Android. Use this library to mimic Apple's iOS or Samsung's bedtime picker.
Stars: ✭ 266 (+21.46%)
Mutual labels:  slider, range
Roundslider
roundSlider - A free jQuery plugin
Stars: ✭ 232 (+5.94%)
Mutual labels:  slider, range-slider
slider
Vue 3 slider component with multihandles, tooltips merging and formatting (+Tailwind CSS support).
Stars: ✭ 162 (-26.03%)
Mutual labels:  range, range-slider
react-simple-range
🔉 React slider component for inputting a numeric value within a range.
Stars: ✭ 20 (-90.87%)
Mutual labels:  slider, range
AORangeSlider
AORangeSlider is a custom UISlider with two handlers to pick a minimum and a maximum range.
Stars: ✭ 82 (-62.56%)
Mutual labels:  slider, range
React Range
🎚️Range input with a slider. Accessible. Bring your own styles and markup.
Stars: ✭ 545 (+148.86%)
Mutual labels:  slider, range
Range Slider
The simplest JavaScript custom range slider ever!
Stars: ✭ 41 (-81.28%)
Mutual labels:  slider, range
Rangeslider.js
🎚 HTML5 input range slider element polyfill
Stars: ✭ 2,153 (+883.11%)
Mutual labels:  range-slider
Iptools
PHP Library for manipulating network addresses (IPv4 and IPv6)
Stars: ✭ 163 (-25.57%)
Mutual labels:  range
Lightpick
(deprecated) Check out the new date picker Litepicker
Stars: ✭ 204 (-6.85%)
Mutual labels:  range
Angular Bootstrap Slider
an angularjs directive for seiyria-bootstrap-slider
Stars: ✭ 183 (-16.44%)
Mutual labels:  slider
Rangeslider
Simple, small and fast vanilla JavaScript polyfill for the HTML5 `<input type="range">` slider element.
Stars: ✭ 161 (-26.48%)
Mutual labels:  range-slider
Rangeview
Android range view for cropping (video, audio, etc.)
Stars: ✭ 157 (-28.31%)
Mutual labels:  range

react-slider-kit

N|Solid

react-slider-kit is going to be a comprehensive solution to slider feature in react. This component was originally inspired by dribble concept design The Range Slider Component.

This slider components is going to include:

  • 1D and 2D sliders
  • Single and range sliders (in progress)
  • Horizontal and vertical sliders

Demo

The working demo of this component can be find at https://m-izadmehr.github.io/react-slider-kit/. An image of the original dribble design is shown below:

N|Solid


Installation

Using npm (use --save to include it in your package.json)

$ npm install react-slider-kit --save

Using yarn (this command also adds react-rangeslider to your package.json dependencies)

$ yarn add react-slider-kit

Getting Started

react-slider-kit is going to be a package of different sliders. In order to use a slider 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 {} from 'react-rangeslider'

// Not using an ES6 transpiler
var Slider = require('react-rangeslider')

Basic Example

import React, { Component } from 'react'
import {SingleSlider} from 'react-slider-kit';

export default class SimpleExample extends Component {
  constructor(props, context) {
    super(props, context)
    this.state = {
      value: 0
    }
  }

  handleOnChange = (value) => {
    this.setState({
      value: value
    })
  }

  render() {
    return (
       <SingleSlider
            min={0}
             max={100}
            step={20}
            start={80}
            onChangeStart={() => console.log('start drag')}
            onChange={(value)=>console.log('drag value: ', value)}
            onChangeComplete={this.handleOnChange}
        />
    )
  }
}

API

React-Slider-Kit is bundled as a combination of multiple components, and by default the single slider is imported.

Component

import {SingleSlider} from 'react-slider-kit';

// inside render

<SingleSlider
    min={Number}
    max={Number}
    step={Number}
    start={Number}
    sliderTo={Number}
    prefix={String}
    postfix={String}
    labels={Array}
    sticky={Boolean}
    tooltip={String}
    orientation={String}

    // chart configs
    chartData={Array}
    chartTooltip={Boolean}
    chartLength={Number}

    // methods
    onChangeStart={function}
    onChange={function}
    onChangeComplete={function}
/>

Props

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
start number 0 starting value of slider
sliderTo number undefined used to change the value of slider manually (componentWillReceiveProps is listening for changes in this value)
tooltip string 'always' controls when slider tooltip is shown (always/onClick/never)
prefix string '' prefix in tooltip label (eg. '$')
postfix string '' postfix in tooltip label (eg. 'kg')
labels array [] custom labels to show on slider (eg. [{x:0,val:'Start'}, {x:50,val:'Middle'},]
sticky boolean false controls whether slider handle can move smoothly or it can only sit on step values
orientation string 'horizontal' slider orientation (eg. horizontal, vertical)
chartData array - used for showing 2D frequency graph on the slider (eg. [{ y: 0 }, { y: 0.1 }, { y: 1 }, { y: 1.5 }, { y: 3 }])
chartTooltip boolean false controls whether chart tooltip is shown on hover on data points
chartLength number 200 chart height (width) of chart in horizontal (vertical) orientation
onChangeStart function - function called on starting to drag slider
onChange function - function called during moving slider(on every pixel)
onChangeComplete function - function called after finishing slider move (used to set slider value on state)

License

MIT

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].