0.0.0 • Published 1 year ago

@manuelbento19/react-input-suggest v0.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

License: MIT

React Input Suggest

The React Input Suggest component is a useful tool for improving user experience on forms and input fields. It provides intuitive and responsive suggestion functionality, allowing users to receive relevant suggestions as they type in an input field. When typing, the component suggests options based on previous input, pre-defined values ​​or an external data source, helping users enter data efficiently and accurately. Additionally, React Input Suggest is highly customizable, allowing you to adapt styles and behaviors to meet the specific needs of different applications and usage contexts. With its ability to simplify data entry and improve usability, React Input Suggest is a valuable addition to any React project that requires intuitive and effective data entry.

Installation

npm install react-input-suggest  # using npm
pnpm install react-input-suggest # using pnpm
yarn add react-input-suggest     # using yarn

Example

import { useState } from "react";
import InputSuggest from "react-input-suggest";

const data = ["Java","Python","C#","Ruby","R","Rust","Cobol","Pascal","C","C++"]

export default function App() {
  const [value,setValue] = useState("");
  const submit = () => {
    console.log(value)
  }
  return(
    <div id='container'>
      <label htmlFor="name">Country</label>
      <div id='input_container'>
        <InputSuggest value={value} onChange={setValue} data={data}/>
      </div>
      <button onClick={submit}>Save</button>
    </div>
  )
}

License

This library is licensed under the MIT license. See the LICENSE file for details.

Contributing

Feel free to contribute to this project by submitting issues or pull requests on GitHub.

0.0.0

1 year ago