# rangepicker.js

> range picker component

Latest version **1.2.2** (published 2017-02-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install rangepicker.js
pnpm add rangepicker.js
yarn add rangepicker.js
bun add rangepicker.js
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.2 |
| Published | 2017-02-06 |
| First published | 2017-02-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Erik Drobne |
| Maintainers | code.journey |
| Keywords | range, picker, rangepicker, rangepicker.js, slider, rangeslider, rangeslider.js, javascript |

## Links

- npm: https://www.npmjs.com/package/rangepicker.js
- Repository: https://github.com/erikdrobne/rangepicker.js
- Homepage: https://github.com/erikdrobne/rangepicker.js#readme
- Issues: https://github.com/erikdrobne/rangepicker.js/issues
- npm.io page: https://npm.io/package/rangepicker.js

## Alternatives

- [adhdev](https://npm.io/package/adhdev.md) — 11.1K weekly downloads
- [react-slide-button](https://npm.io/package/react-slide-button.md) — 310 weekly downloads
- [better](https://npm.io/package/better.md) — 42 weekly downloads
- [react-native-swipe-image](https://npm.io/package/react-native-swipe-image.md) — 22 weekly downloads
- [nl.fokkezb.pulltorefresh](https://npm.io/package/nl.fokkezb.pulltorefresh.md) — 11 weekly downloads

## Recent versions

- 1.2.2 (latest) — 2017-02-06
- 1.2.1 — 2017-02-06
- 1.2.0 — 2017-02-05
- 1.1.0 — 2017-02-05
- 1.0.1 — 2017-02-05
- 1.0.0 — 2017-02-05

## README

# rangepicker.js
<a href="https://www.npmjs.com/package/rangepicker.js"><img src="https://img.shields.io/npm/v/rangepicker.js.svg" alt="Version"></a>

![rangepicker.js](rangepicker.png)

## Installation

```bash
$ npm install rangepicker.js
```
or clone repository.

Pre build files can be found in the ```/build``` folder.
Include ```rangepicker.js``` and(optionally) ```rangepicker.css``` in your project.

## Usage

```html
<div id="rangePicker"></div>
```
```javascript
var element = document.getElementById('rangePicker');
var rp = rangepicker(element, options);
```

## API

### Properties

Property | Description
--- | ---
`element` | Element where you would like to initialize ```rangepicker.js```. |
`options` | An object containing configuration options. Pass ```{}``` for defaults. |

#### Options

Option | Description
--- | ---
`range` | An object containing range options. It consists of ```size```, ```step``` and ```value``` parameters. |
`orientation` | Component orientation. Possible values ```horizontal | vertical```. Default ```horizontal```. |
`itemHeight` | Range item height in ```px```. It will take effect in ``` horizontal``` mode. |
`itemWidth` | Range item width in ```px```. It will take effect in ``` vertical``` mode. |
`disabled` | Default ```false```. If ```true```, component will be disabled.
`onInitialize` | ```callback```, fired when component is initialized.


### Methods

Usage: ```rp.methodName()```

Method | Description
--- | ---
`setValue(value)` | Sets given value. |
`getValue()` | Returns the component current value. |
`next()` | Sets next range value. |
`prev()` | Sets previous range value. |
`enable()` | Enables component. |
`disable()` | Disables component. |
`on(event, handler)` | Adds event listener. |

### Events

Event | Description
--- | ---
`rp.change` | Fired when value is changed. |

## Contribution

1. Fork it
2. Create feature branch
3. Commit changes
4. Push to the branch
5. Create new pull request

---
_Source: https://npm.io/package/rangepicker.js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
