Skip to main content
The openConnect function opens the wallet connection drawer, allowing users to connect external wallets including MetaMask, WalletConnect, and social login options.
This function provides the primary interface for new users to connect their wallets and existing users to switch between different wallet connections.

Function Signature

function openConnect(): void
The function takes no parameters and immediately opens the wallet connection interface.

Basic Usage

import { useInterwovenKit } from "@initia/interwovenkit-react"

function ConnectButton() {
  const { openConnect, isConnected } = useInterwovenKit()

  if (isConnected) {
    return <span>Wallet connected</span>
  }

  return (
    <button onClick={openConnect}>
      Connect Wallet
    </button>
  )
}

Example Usage

function ConnectButton() {
  const { openConnect, isConnected } = useInterwovenKit()

  if (isConnected) return <span>Connected</span>

  return (
    <button onClick={openConnect}>
      Connect Wallet
    </button>
  )
}