A React Slider
To run the demo locally with live reload functionality:
npm install PORT=3000 npm start
localhost:3000 in a browser.
To run the demo locally without live reload:
npm install PORT=3000 npm run start-static
The easiest way to use nw-react-slider is to install it from NPM and include it in your own build process (Webpack, Browserify, etc)
$ npm install --save nw-react-slider
You can also use the standalone UMD build by including
dist/nw-react-slider.min.js, as well as the styles from
/** @jsx React.DOM */var React =var ReactDOM =var Slider =var App = ReactReactDOM
<NWReactSlider/> element is an improved upon version of an HTML5 range type input. You are able to smoothly drag the handle no matter how large or small the number of your steps are, and you are able to style it more effectively. You can also add tick marks to your steps if you wish.
<NWReactSlider/> is also compatible with IE9.
Styles are generated from
src/slider.less. That can be pulled directly into your build process if you use
less already, or you can pull the generated CSS from either
React.PropTypes.number) Determines the start position of your slider. Must be a number between
React.PropTypes.number) The smallest number you want in the range. Default
min is 0.
React.PropTypes.number) The largest number you want in the range. Default
max is 10.
React.PropTypes.bool) A boolean to show tick marks on the slider. Default true.
React.PropTypes.array) An array filled with values and labels for which position on the slider track you want to mark
React.PropTypes.func) A function that will be fired when the position of the handle changes. Default none
React.PropTypes.bool) A boolean to show a floating label below the handle. Default false
- Fork the project
- Make changes
- Double check changes work by adding it to the examples
- Update README with appropriate docs
- Commit and create a PR