react-headless-auto-suggest
v1.0.53
Published
A headless auto suggesting input component
Downloads
726
Maintainers
Readme
How to use this inside your component.
Simple like this ...
import { useState } from "react";
import SuggestionsInput from "react-headless-auto-suggest";
function App() {
const [value, setValue] = useState("");
return (
<div className="App">
<div>
<SuggestionsInput
onChange={(e) => setValue(e.target.value)}
value={value}
suggestions={[
{
value: "1",
content: "one",
},
{
value: "2",
content: "two",
},
{
value: "3",
content: "three",
},
]}
/>
</div>
</div>
);
}
export default App;