InputAutoComplete component
An auto complete component with drop down list options
Install
npm i @wethecurious/wtc-ui-library
Usage
Import it into your project
import { InputAutoComplete } from '@wethecurious/wtc-ui-library'
<InputAutoComplete
onSelect={action('selected')}
label='Country'
datalist={[
{
label: 'Australia',
value: 'au'
},
{
label: 'Austria',
value: 'at'
},
{
label: 'Azerbaijan',
value: 'az'
}
]}
/>
Props
Prop | Description | Default |
---|---|---|
scale | Sets the size of the input | |
isUseNative | Uses native UI for mobile devices | |
onBlur | Callback for on blur event | |
onFocus | Callback for on focus event | |
onSubmit | Callback for on submit event | |
onSelect | Callback for on select event | |
isRequired | Set element input is required | |
datalist | List of auto complete values | |
label | Input display label |