react-autocomplete-npm

2.0.0 • Public • Published

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;

/react-autocomplete-npm/

    Package Sidebar

    Install

    npm i react-autocomplete-npm

    Weekly Downloads

    18

    Version

    2.0.0

    License

    none

    Unpacked Size

    18.7 kB

    Total Files

    5

    Last publish

    Collaborators

    • arunravi218