HashInput component for entering and detecting blockchain addresses, transaction hashes, or ENS names.
This component provides an input field that processes user input to detect its type
(address, transaction hash, or ENS name) on a specified blockchain network.
It uses debounced search to prevent excessive requests and can be customized with a custom input renderer.
Param: props
The props for the HashInput component.
Param: props.chain
The blockchain network to use for detection (from viem chains).
Param: props.debounceTime
Delay in milliseconds before triggering search after input changes.
Param: props.onLoading
Callback fired when loading state changes.
Param: props.onSearch
Callback fired with detection results.
Param: props.renderInput
Custom input renderer function.
Param: props.value
Controlled input value.
Param: props.restProps
Additional props inherited from Chakra UI InputProps.
Example
<HashInput chain={mainnet} onSearch={(result) =>console.log(result)} debounceTime={300} placeholder="Enter address, ENS name or transaction hash" />
HashInput component for entering and detecting blockchain addresses, transaction hashes, or ENS names.
This component provides an input field that processes user input to detect its type (address, transaction hash, or ENS name) on a specified blockchain network. It uses debounced search to prevent excessive requests and can be customized with a custom input renderer.