React autocomplete component library
npm install @centrodphlibs/autocompleteReact autocomplete component library.
``bash`
npm install @centrodphlibs/autocomplete
Simply import the component - CSS styles are automatically injected! No need to import CSS separately.
`tsx
import { Autocomplete } from '@centrodphlibs/autocomplete';
function App() {
return (
search={search}
onChange={handleChange}
onSelection={handleSelection}
isLoading={isLoading}
/>
);
}
`
That's it! The styles are automatically injected when you import the component. Works in all modern environments including Vite, Webpack, Parcel, and even in browser environments without a bundler.
Run nx test autocomplete` to execute the unit tests via Vitest.