0.0.3 • Published 4 years ago

@alphasquad/predictive-search v0.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

Available Scripts

Search field with predictive dropdown.

npm i @alphasquad/predictive-search

OR

yarn add @alphasquad/predictive-search

Demo

npm.io

How to use?

import Horizontal from "@alphasquad/predictive-search";

<PredictiveSearch
    keyword={text} // keyword that is being taken in getKeyword
    getKeyword={getKeyword} // for getting the value of input field
    results={results} // Array of string.
    placeholder="Search..."
    wrapperClass="wrapperClass"
/>

Props

PropsTypesDescriptionRequiredDefault
keywordstringThe keyword that is entered by the user in input fieldtrue-
getKeywordMethodThe method to get text from input field.truefalse
wrapperClassstringclass will be applied on the wrapping divfalse-
resultsarray of stringThis should be an array of string. These results will be displayed below input section.true-
placeholderstringPlaceholder text in input fieldfalse-