# react-search-bar-allreact

> For off search bar with autosuggest so it can work with react 16

Latest version **2.2.2** (published 2017-12-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-search-bar-allreact
pnpm add react-search-bar-allreact
yarn add react-search-bar-allreact
bun add react-search-bar-allreact
```

## 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 | 2.2.2 |
| Published | 2017-12-10 |
| First published | 2017-12-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 154 |
| Author | Vakhtang Sidamonidze |
| Maintainers | pontusvision |
| Keywords | search, search bar, autosuggest, react, react-component |

## Links

- npm: https://www.npmjs.com/package/react-search-bar-allreact
- Repository: https://github.com/vakhtang/react-search-bar
- Issues: https://github.com/vakhtang/react-search-bar/issues
- npm.io page: https://npm.io/package/react-search-bar-allreact

## Dependencies (2)

- [classnames](https://npm.io/package/classnames.md) ^2.2.5
- [react-autobind](https://npm.io/package/react-autobind.md) ^1.0.6

## 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

- 2.2.2 (latest) — 2017-12-10

## README

A general-purpose search bar, built in React. View the [demo](https://vakhtang.github.io/react-search-bar).

## Development

To run the dev server:

```sh
npm start
```

To run tests and lint:

```sh
npm run check
```

## Props

| Prop                | Type                      | Required                          | Description |
| :-----------------  | :----------------         | :-------------------------------: | :---------- |
| autoFocus           | _boolean_                 |                                   | If `true`, focuses the input when the component loads |
| delay               | _number_                  |                                   | The number of milliseconds to wait after the last key stroke before calling `onChange` |
| onChange            | _function_                | &#x2713;                          | Called when input changes |
| onClear             | _function_                | &#x2713;                          | Called when suggestions are cleared |
| onSearch            | _function_                | &#x2713;[<sup>1</sup>](#footnote) | Called when clicking the search button or enter (presumes that search button is available) |
| onSelection         | _function_                |                                   | Called when selecting a suggestion |
| renderClearButton   | _boolean_                 |                                   | Flag indicating whether to display the clear button |
| renderSearchButton  | _boolean_                 |                                   | Flag indicating whether to display the search button |
| style               | _object_                  |                                   | Style object |
| suggestionRenderer  | _function_                |                                   | Function to render suggestions |
| suggestions         | _array\<string>_          | &#x2713;                          | Array of suggestions |

Also accepts [supported HTML attributes](https://facebook.github.io/react/docs/dom-elements.html#all-supported-html-attributes) for the `<input>` element.

<sup id="footnote">1</sup> Only when `renderSearchButton` is `true`

## License

MIT

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