4.0.5 • Published 5 years ago

react-slider-simple v4.0.5

Weekly downloads
65
License
ISC
Repository
github
Last release
5 years ago

react-slider-simple

Install:

yarn add react-slider-simple

or

npm install --save react-slider-simple

\ Usage:

class App extends Component {
  render() {
    return (
        <Slider
          rounded={false}
        />
    );
  }
}

sliding

import React, { Component } from 'react';
import Slider from 'react-slider-simple';

export default class SliderComp extends Component {
  state  = {
    percent: 30,
  }

  onChange = (percent) => {
    console.log(percent);
    this.setState({ percent });
  }
  onDone = (percent) => {
    console.log(`I'm done. here's the percent: ${percent}%`);
  };

  render() {
    const { percent } = this.state;
    return (
        <Slider
          value={percent}
          onChange={this.onChange}
          onDone={this.onDone}
          thumbColor="rgb(219, 112, 147)"
          shadowColor="rgb(219, 112, 100)"
          sliderPathColor="rgb(119, 12, 47)"
        />
    );
  }
}

sliding

Properties:

PropertyDescriptionTypeDefaults
onDonereturns % of slider positionfunction-
onChangereturns % of slider positionfunction-
valuevalue of slidernumber0
defaultValuedefault value of slidernumber0
displayThumbAlways show thumbbooleantrue
roundedrounded cornersbooleantrue
thumbColorThe color of thumbstring-
shadowColorThe color of shadowstring-
sliderPathColorThe color of pathstring-
4.0.5

5 years ago

4.0.4

6 years ago

4.0.3

6 years ago

4.0.2

6 years ago

4.0.1

6 years ago

4.0.0

6 years ago

3.0.0

6 years ago

2.0.9

6 years ago

2.0.8

6 years ago

2.0.7

6 years ago

2.0.6

6 years ago

2.0.5

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago