react-autocomplete-npm
v2.0.0
Published
Flexible react auto complete component
Downloads
77
Maintainers
Readme
React-Autocomplete
This is a simple light weight autocomplete select component for react. Initially built for use in STEPS Ejyothi.
Live Demo
Check out the React Autocomplete Sandbox for a live demo.
Installation
npm install react-autocomplete-npm
Usage
import { useState, React } from 'react';
import { Multiselect } from 'react-autocomplete-npm';
const options = [
{ vale: 1, label: "Angular" },
{ value: 2, label: "React" },
{ value: 3, label: "View" },
{ value: 4, label: "LoveJS" }
];
function App() {
const [selectedItem, handleChange] = useState(null);
return (
<div className="react-autocomplete-npm">
<Multiselect
placeholder={'Search Items'}
data={options}
value={selectedItem}
handleOnChange={handleChange}
/>
</div>
);
}
export default App;