Customization

Component props that you may want to specify

Prop nameTypeExampleDescription

type

"resolve" | "reverse" | "combined"

"combined" (default)

defines the mode of operation of the resolver

autoFocus

boolean

true

focus the control when it mounts

theme

"dark" | "light"

"dark"

apply dark or light theme to the component

width

string

100px or 100%

set component width

disabled

boolean

false

disable the control

onUpdate

(res: TypedResult | null) => void

(result) = > console.log(result)

{ domain: "nick.eth", from: "ens", type: "reverse" }

hiddenAddressGap

{ leadingCharLimit: number; trailingCharLimit: number; }

{leadingCharLimit: 4, trailingCharLimit: 6}

specify the size of the address hidden. For example, for an address with the following parameters hiddenAddressGap={{leadingCharLimit: 4, trailingCharLimit: 6}} you can see following result: 0x6B ... D55d04

resolverOptions

object

{
  redefined: {
      node: "https://evm.node.io/123abc",
  },
  unstoppable: {
      mainnetNode: "https://evm2.node.io/123abc",
      polygonMainnetNode: "https://evm-polygon.node.io/123abc",
  },
  ens: {
    node: "https://evm.node.io/123abc",
  },
}

change the resolver options for Resolver engine such as specify resolver services or set nodes

Last updated