# react-incremental-search

> Made with create-react-library

Latest version **1.0.0** (published 2021-06-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-incremental-search
pnpm add react-incremental-search
yarn add react-incremental-search
bun add react-incremental-search
```

## 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.0 |
| Published | 2021-06-11 |
| First published | 2021-06-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 2 |
| Unpacked size | 28.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | yuriko627 |
| Maintainers | yuriko627 |

## Links

- npm: https://www.npmjs.com/package/react-incremental-search
- Repository: https://github.com/yuriko627/incremental-search
- Homepage: https://github.com/yuriko627/incremental-search#readme
- Issues: https://github.com/yuriko627/incremental-search/issues
- npm.io page: https://npm.io/package/react-incremental-search

## Dependencies (2)

- [fuse.js](https://npm.io/package/fuse.js.md) ^6.4.6
- [recharts](https://npm.io/package/recharts.md) ^2.0.9

## Recent versions

- 1.0.0 (latest) — 2021-06-11

## README

# incremental-searchbox-react-component

Search with a keyword and some of the closest results (using fuzzy search) will show.

![demo](./incremental-searchbox.gif)

[![NPM](https://img.shields.io/npm/v/incremental-search.svg)](https://www.npmjs.com/package/incremental-search) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save incremental-search
```

## Usage

With React Component

```tsx
import React, { Component } from 'react'

import IncrementalSearchBox from 'incremental-search'
import 'incremental-search/dist/index.css'

class Example extends Component {
  render() {
    return <IncrementalSearchBox />
  }
}
```

With React hooks

```tsx
import React, { useState } from 'react'
import IncrementalSearchBox from 'incremental-search'

export default function App() {
  const [selectedOption, setSelectedOption] = useState(null)
  const [coins, setCoins] = React.useState([])

  return (
    <div className='App'>
      <IncrementalSearchBox
        options={coins}
        dataKey='name'
        style={undefined}
        onSelect={setSelectedOption}
      />
    </div>
  )
}
```

## Running Example in Local

![demo](./incremental-search-example.gif)

```
npm start
```

open a different tab

```
cd example
npm start
```

## License

MIT © [yuriko627](https://github.com/yuriko627)

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