/connect-wallet-button

Learn how to use the ConnectWallet Button component from the React SDK!

Primary LanguageJavaScriptApache License 2.0Apache-2.0

Connect Wallet Button

This template shows you how you can use our ConnectWallet component from our React SDK to allow users to connect their wallet with your app with one of the following wallets:

  • MetaMask
  • Wallet Connect
  • Coinbase Wallet

Wrap Your Application in the ThirdwebProvider

import { ThirdwebProvider } from '@thirdweb-dev/react';

// This is the chainId your dApp will work on.
const activeChain = 'goerli';

function MyApp({ Component, pageProps }) {
	return (
		<ThirdwebProvider activeChain={activeChain}>
			<Component {...pageProps} />
		</ThirdwebProvider>
	);
}

export default MyApp;

Use the Connect Wallet Component!

import { ConnectWallet } from '@thirdweb-dev/react';

export default function Home() {
	return <ConnectWallet theme='dark' />;
}