Simple React component that implements the auto-completion of account names on the EOS Blockchain.
npm install react-eos-account-input-autocomplete
import EosAccountInputAutocomplete from 'react-eos-account-input-autocomplete'
const [value, setValue] = useState('')
....
<EosAccountInputAutocomplete
value={value}
limit={5} //default to 10
rpc={'your rpc address or an instance of JsonRpc'}
onChange={_e => setValue(_e.target.value)}
onSelect={_value => setValue(_value)}
onFetchAccounts={_accounts => console.log(_accounts)}
/>
It's possible to override the css classes (by default they are empty):
eos-account-input-autocomplete__input
: input texteos-account-input-autocomplete__list
: list containereos-account-input-autocomplete__item
: single item within the list