2.0.0 • Published 12 months ago

react-autocomplete-npm v2.0.0

Weekly downloads
-
License
-
Repository
github
Last release
12 months ago

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;