New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-step-range-slider

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-step-range-slider

A range slider input for React

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
476
decreased by-10.02%
Maintainers
1
Weekly downloads
 
Created
Source

react-step-range-slider

Use this component like a range input. Supports dynamic steps with breakpoints. Fully responsive.

Example

react-step-range-slider

Usage:

const breakpoints = [
  { breakpoint: 0, step: 1 }, // acts as min value
  { breakpoint: 20, step: 5 }, 
  { breakpoint: 50, step: 10 },
  { breakpoint: 100, step: 50 },
  { breakpoint: 500 } // acts as max value
]

<StepRangeSlider 
  value={30} 
  breakpoints={breakpoints} 
  onChange={value => console.log(value)}
/>

Props

breakpoints : array

Configures the step for each breakpoint as well as the min and max step/values. Required.

value : number

Determines the position of the drag handle. Should be divisible by the step value at the appropriate breakpoint.

defaultValue : number

Determines initial position of the drag handle.

onChange : function

Callback called on value change.

onChangeComplete : function

Callback called onDragEnd or onClick.

disabled : bool

Prevent value change.

children : any

Display whatever you want in the drag tooltip.

Methods

stepDown() : number

Decrements the value of the slider control by a specified number.

stepUp() : number

Increments the value of the slider control by a specified number.

Keywords

FAQs

Package last updated on 20 Aug 2016

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