# react-component-range

> React Component Range is a simple and minimal React input range component

Latest version **1.0.0** (published 2019-01-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-component-range
pnpm add react-component-range
yarn add react-component-range
bun add react-component-range
```

## 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.0.0 |
| Published | 2019-01-27 |
| First published | 2019-01-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 23.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Adrián Bolonio |
| Maintainers | bolonio |
| Keywords | react, react-component, react-input, range-slider, input-range, input, form, range, slider, number |

## Links

- npm: https://www.npmjs.com/package/react-component-range
- Repository: https://github.com/bolonio/react-component-range
- Homepage: https://github.com/bolonio/react-component-range#readme
- Issues: https://github.com/bolonio/react-component-range/issues
- npm.io page: https://npm.io/package/react-component-range

## Dependencies (2)

- [react-scripts](https://npm.io/package/react-scripts.md) 2.1.3
- [webpack-dev-server](https://npm.io/package/webpack-dev-server.md) >=3.1.14

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2019-01-27

## README

# react-component-range

[![npm version](https://img.shields.io/npm/v/react-component-range.svg?style=flat)](https://www.npmjs.com/package/react-component-range)
[![Build Status](https://travis-ci.org/bolonio/react-component-range.svg?branch=master)](https://travis-ci.org/bolonio/react-component-range)

React Component Range is a simple and minimal React input range component

## Install

    npm install react-component-range

## Usage

```jsx
import React, { Component } from "react";
import ReactRange from "react-component-range";

class App extends Component {
  onChange = value => {
    console.debug("Value: ", value);
  };

  render() {
    return (
      <ReactRange
        min={0}
        max={100}
        defaultValue={50}
        ariaLabel="Slider to adjust the volume"
        onChange={this.onChange}
      />
    );
  }
}

export default App;
```

## Props

| Name           | Type     | Default    | Description                                                                                                                            |
| -------------- | -------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| id             | string   |            | The id of the input (range)                                                                                                            |
| name           | string   |            | The input's name, to identify the input in the data submitted with the form's data                                                     |
| min            | number   | `0`        | The minimum permitted value                                                                                                            |
| max            | number   | `100`      | The maximum permitted value                                                                                                            |
| step           | number   | `1`        | The stepping interval, used both for user interface and validation purposes                                                            |
| onChange       | function | `() => {}` | The callback action to be performed when the value changes. It returns the current value.                                              |
| value          | number   |            | The input's current value                                                                                                              |
| defaultValue   | number   | `0`        | The input's initial value                                                                                                              |
| ariaLabel      | string   |            | The accesibility aria-label property of the input                                                                                      |
| ariaLabelledby | string   |            | The accesibility aria-labelledby property of the input                                                                                 |
| disabled       | boolean  | `false`    | A Boolean attribute which is present if the input should be disabled                                                                   |
| required       | bollean  | `false`    | A Boolean which, if true, indicates that the input must have a value before the form can be submitted                                  |
| tabIndex       | number   |            | A numeric value providing guidance to the user agent as to the order in which controls receive focus when the user presses the Tab key |

## Contributing

Feel free to submit issues and enhancement requests.

Please refer to each project's style guidelines and guidelines for submitting patches and additions. In general, we follow the "fork-and-pull" Git workflow.

1.  **Fork** the repo on GitHub
2.  **Clone** the project to your own machine
3.  **Commit** changes to your own branch
4.  **Push** your work back up to your fork
5.  Submit a **Pull request** so that we can review your changes

NOTE: Be sure to merge the latest from "upstream" before making a pull request!

## Future actions

- Typescript component
- Write tests for the component
- Personalization (color and size)

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