@feizheng/react-range
v1.0.0
Published
Pure range form element for react.
Downloads
9
Readme
react-range
Pure range form element for react.
installation
npm install -S @feizheng/react-range
update
npm update @feizheng/react-range
properties
| property | type | default | description | | --------- | ------ | ------- | ----------- | | className | String | - | - | | value | - | - | - | | onChange | - | - | - |
usage
- import css
@import "~@feizheng/react-range/dist/style.scss";
// customize your styles:
$react-range-options: ()
- import js
import ReactRange from '../src/main';
import ReactDOM from 'react-dom';
import React from 'react';
import './assets/style.scss';
class App extends React.Component {
render() {
return (
<div className="app-container">
<ReactRange
min="2"
max="10"
step="2"
defaultValue="4"
onChange={(e) => {
console.log(e.target.value);
}}
/>
</div>
);
}
}
ReactDOM.render(<App />, document.getElementById('app'));
documentation
- https://afeiship.github.io/react-range/