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.
placeholderstringundefinedNoThe string that will be rendered before address input has been entered.
errorstringundefinedNoError message to display below the input.
onChange(value: string) => voidundefinedYesA callback invoked when the data in the address input changes.
onSubmit() => voidundefinedNoA callback function invoked when the data in the address input is submitted.
containerClassNamestringundefinedNoTailwind CSS class name for the main container wrapper.
inputContainerClassNamestringundefinedNoTailwind CSS class name for the input container.
inputClassNamestringundefinedNoTailwind CSS class name for the input element.
errorClassNamestringundefinedNoTailwind CSS class name for the error message display.
scanbooleanundefinedNoIf set to true, an icon will be displayed to scan addresses.