Socket
Socket
Sign inDemoInstall

react-slider-simple

Package Overview
Dependencies
8
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-slider-simple

Slider component for React


Version published
Weekly downloads
67
increased by24.07%
Maintainers
1
Install size
453 kB
Created
Weekly downloads
 

Readme

Source

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-

Keywords

FAQs

Last updated on 08 Aug 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc