# react-indexlist

> indexlist component based better-scroll for react

Latest version **1.0.7** (published 2019-07-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-indexlist
pnpm add react-indexlist
yarn add react-indexlist
bun add react-indexlist
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2019-07-31 |
| First published | 2018-03-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 77.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | YanYuanFE |
| Maintainers | yanyuanfe |
| Keywords | react, react-component, indexlist, better-scroll |

## Links

- npm: https://www.npmjs.com/package/react-indexlist
- Repository: https://github.com/YanYuanFE/react-indexlist
- Issues: https://github.com/YanYuanFE/react-indexlist/issues
- npm.io page: https://npm.io/package/react-indexlist

## Dependencies (2)

- [prop-types](https://npm.io/package/prop-types.md) ^15.6.2
- [better-scroll](https://npm.io/package/better-scroll.md) ^1.13.2

## 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.7 (latest) — 2019-07-31
- 1.0.6 — 2019-07-31
- 1.0.5 — 2019-01-02
- 1.0.4 — 2018-12-29
- 1.0.3 — 2018-12-29
- 1.0.2 — 2018-12-29
- 1.0.1 — 2018-12-29
- 1.0.0 — 2018-12-29
- 0.1.1 — 2018-03-26
- 0.1.0 — 2018-03-26

## README

# react-indexlist

[![](https://img.shields.io/npm/l/react-indexlist.svg?style=flat-square)](https://github.com/YanYuanFE/react-indexlist)
[![](https://img.shields.io/npm/v/npm.svg?style=flat-square)](https://github.com/YanYuanFE/react-indexlist)

### Description
Indexlist component based better-scroll for react。

### Quick Start

#### Install

``` bash
npm install react-indexlist --save

or yarn add react-indexlist
```


#### Usage

``` js
import IndexList from 'react-indexlist';
import 'react-indexlist/dist/index.css';
```

``` js
handleSelect = (item) => {
    console.log(item);
}

<IndexList data={arr} onSelect={this.handleSelect} className="my-indexlist" />
```

#### Example

![indexlist](http://img.yanyuanfe.cn/indexlist1.png)

![indexlist](http://img.yanyuanfe.cn/indexlist2.png)

![indexlist](http://img.yanyuanfe.cn/indexlist.gif)


#### Prop types

``` js
propTypes: {

    // className of component
    className: PropTypes.string,

    // Array of list
    data: PropTypes.array.isRequired, // Default: Array<{ title: string, items: array<{ name: string }> }>

    // render item by self, return ReactNode
    renderItem: PropTypes.func, // function (item)

    // onClick item callback
    onSelect: PropTypes.func, // function (item)
}

```

#### License

[MIT][mit-license]

[mit-license]: ./LICENSE

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