Skip to main content

AddressInput

Display an Ethereum address input that shows a blockie image for each address.

AddressInput Example

Import

import { AddressInput } from "~~/components/eth-mobile";

Usage

const [address, setAddress] = useState("");
<AddressInput onChange={setAddress} value={address} placeholder="Input your address" />

Props

PropTypeDefault ValueRequiredDescription
valuestringundefinedYesAn Ethereum address in (0x___ format) or an ENS domain.
onChangefunctionundefinedYesA callback invoked when the data in the address input changes.
placeholderstringundefinedNoThe string that will be rendered before address input has been entered.
onSubmitfunctionundefinedNoA callback function invoked when the data in the address input is submitted.
containerStyleViewStyleundefinedNoA style object for the wrapper.
inputStyleTextStyleundefinedNoA style object for the container.
outlineStyleTextStyleundefinedNoA style object for the outlined wrapper.
contentStyleTextStyleundefinedNoA style object for the content.
scanbooleanundefinedNoIf set to true, an icon will be displayed to scan addresses.