Skip to main content


Hook for connecting any supported wallet config to your app.

import { useConnect } from "@thirdweb-dev/react";

const connect = useConnect();

The wallet also needs to be added in ThirdwebProvider's supportedWallets if you want the wallet to auto-connect on next page load.


import { useConnect, metamaskWallet } from "@thirdweb-dev/react";

const metamaskConfig = metamaskWallet();

function App() {
const connect = useConnect();

return (
onClick={async () => {
const wallet = await connect(metamaskConfig, connectOptions);
console.log("connected to ", wallet);
Connect to MetaMask



The wallet to connect to your app with.

Must be of type WalletConfig.

Learn more about the available wallet options.


connectOptions depends on the wallet you are connecting.

If you are using typescript, connect will automatically infer the type of connectOptions based on the walletConfig you pass in.