Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yuriko627/incremental-search
https://github.com/yuriko627/incremental-search
Last synced: 25 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/yuriko627/incremental-search
- Owner: yuriko627
- Created: 2021-06-07T12:49:21.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-06-10T15:37:40.000Z (over 3 years ago)
- Last Synced: 2024-11-27T23:34:21.028Z (about 1 month ago)
- Language: TypeScript
- Size: 6.58 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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
}
}
```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 (
)
}
```## 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)