Every onchain app starts with the same moment: a user arrives and needs to connect. If that moment fails, nothing else in the product matters. Yet building wallet connection yourself means supporting hundreds of wallets, each with its own quirks, across multiple chains, on desktop and mobile. Teams that build it in-house end up maintaining a connection layer instead of their product.
A connect wallet button solves this in one component. Users click it, choose how they want to sign in, and arrive in your app connected. This guide explains how a connect wallet button works, what it gives you beyond the connection itself, and how to add one to a web app step by step using WalletConnect.
Why add a connect wallet button to your app?
Let users bring the wallet they already have
People are loyal to their wallets. Asking them to install a new one, or to copy and paste an address, is where onboarding loses them. A connect wallet button lets every user sign in with the retail, hardware or institutional wallet they already use, with 700+ wallets to choose from, making the first step in your app feel familiar rather than a hurdle. Find the full list of supported wallets in our WalletGuide.
Eliminate the need to maintain wallet relationships
Integrating wallets one by one means a separate integration, a separate update cycle and a separate point of contact for each provider. Maintaining connections with hundreds of wallets is simply unrealistic for most apps, platforms and websites. A connect wallet button built on WalletConnect gives you access to 700+ wallets through a single integration. This makes it a reliable fallback when a user wants to connect with a wallet you don't want to integrate directly. Plus, when wallets ship updates or new wallets join the network, your app supports them without any extra work on your side.
Reach institutional and hardware wallet users
For smaller scale apps, platforms and websites, integrating institutional and hardware wallets is less feasible. The development teams behind these wallets often gatekeep integrations, and a small business is unlikely to create and maintain a relationship with either. With WalletConnect, you get access to users with hardware wallets such as Ledger and Trezor and institutional wallets such as Fireblocks, as well as retail wallets like MetaMask and Rabby. This expands your support for wallet providers significantly with just a single integration.
Who should add a connect wallet button
DeFi apps
DeFi apps, including trading, lending and yield apps, live or die on how quickly a user can connect and act. A connect wallet button removes the friction between landing on the page and placing the first transaction, across every chain the app supports.
Marketplaces
Marketplaces need to serve buyers and sellers with very different levels of crypto experience. One button lets every user connect with the wallet they already use, from retail wallets to hardware and institutional wallets, so nobody is turned away at the door.
Gaming platforms
Players on gaming platforms and prediction markets expect to start exploring in seconds. A connect wallet button lets them sign in with the wallet they already use, so onboarding feels like any other game rather than a technical setup.
Financial institutions
Financial institutions bringing clients onchain need to support the institutional wallets those clients already use. A connect wallet button opens an app to institutional users, who connect through their existing institutional wallets, alongside retail and hardware wallets.
How a connect wallet button works
A connect wallet button is the visible part of a connection flow. When a user clicks it, a modal opens listing the ways they can connect, such as a mobile wallet by QR code or deep link, or a hardware wallet.
Once the user approves the connection in their wallet, a session is established between the wallet and your app over the WalletConnect Network. That session stays live as the user moves around your app, so they don't need to reconnect on every page. Your app receives the connected account and network, and can then ask the wallet to sign messages or transactions.
Each app identifies itself to the network with a project ID, which you create once in the WalletConnect Dashboard. The connection modal itself is ready-made. You open it from a button in your own interface, and once the user connects, your app reads their account from the session and can show it wherever you like.
Extra capabilities you get by integrating WalletConnect's connect wallet button
A connect wallet button built on WalletConnect does more than connect a wallet. These capabilities come with the same integration.
Verified domains
Impersonation is one of the most common ways users are scammed. When you verify your domain, the Verify API confirms to users that they are connecting to your real app, and warns them when a site is pretending to be you.
Customizable themes
The connection modal can be themed to match your brand, including light and dark modes and your own accent color. Because you open the modal from your own button, the button itself is fully yours to design.
What you'll need before you start
A project ID from the WalletConnect Dashboard
You will need a project ID to initialize the SDK. You create it once in the WalletConnect Dashboard, and it identifies your app on the network.
A web app and a package manager
This guide uses a Next.js app and npm. The WalletConnect docs also cover React, Vue and plain JavaScript, and yarn, pnpm or bun all work in place of npm.
Your target chains
Decide which chains your app will support before you install anything. The SDK is chain agnostic. Each chain family is set up as a namespace, such as eip155 for EVM chains, along with the methods your app will call, such as signing messages or sending transactions.
How to add a connect wallet button: a step-by-step guide
In this example, we will build the connect wallet button using a Next.js project, but you can use any supported framework.
1. Create a project and copy your project ID
Sign in to the WalletConnect Dashboard, create a new project for your app, and copy the project ID it generates. Then add it to a .env file at the root of your project:
NEXT_PUBLIC_PROJECT_ID=<YOUR_PROJECT_ID>Variables prefixed with NEXT_PUBLIC are exposed in the browser, so treat the project ID as public and protect it with an allowlist in the next step. See the Next.js installation guide for more detail.
2. Add your domains to the allowlist
In your project settings on the dashboard, add every origin where your app will run, such as https://example.com. Requests from origins that aren't on the list are denied, which stops others from using your project ID. If the list is empty, all origins are allowed, so add your domains before you go live. Localhost is always permitted for development, and changes take around 15 minutes to apply. The Next.js installation guide covers the allowlist format in full.
3. Install the SDK
Install the SDK and the Universal Connector:
npm install @reown/appkit @reown/appkit-universal-connector @reown/appkit-commonThe SDK works with any network that has a CAIP-25 namespace. See the WalletConnect apps overview for supported chains.
4. Configure your networks and initialize the connector
Create config/index.ts. It defines the networks your app supports, the methods it will call, and your app's details, then initializes the connector:
import { defineChain } from '@reown/appkit/networks'
import { UniversalConnector } from '@reown/appkit-universal-connector'
export const projectId = process.env.NEXT_PUBLIC_PROJECT_ID
if (!projectId) throw new Error('Project ID is not defined')
const ethereum = defineChain({
id: 1,
chainNamespace: 'eip155',
caipNetworkId: 'eip155:1',
name: 'Ethereum',
nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
rpcUrls: { default: { http: ['<https://eth.llamarpc.com>'] } }
})
const metadata = {
name: 'My App',
description: 'My onchain app',
url: '<https://example.com>', // must match your domain
icons: ['<https://example.com/icon.png>']
}
export async function getUniversalConnector() {
return UniversalConnector.init({
projectId: projectId!,
metadata,
networks: [
{
namespace: 'eip155',
chains: [ethereum],
methods: ['personal_sign', 'eth_sendTransaction'],
events: ['chainChanged', 'accountsChanged']
}
],
modalConfig: {
themeMode: 'light'
}
})
}The url in metadata must match the domain your app runs on, because the Verify API uses it to confirm to users that they are connecting to your real app.
5. Add the connect wallet button
The connector opens the connection modal, and you call it from a button you design. In app/page.tsx:
'use client'
import { useEffect, useState } from 'react'
import type { UniversalConnector } from '@reown/appkit-universal-connector'
import { getUniversalConnector } from '../config'
export default function Home() {
const [connector, setConnector] = useState<UniversalConnector>()
const [address, setAddress] = useState<string>()
useEffect(() => {
getUniversalConnector().then(universalConnector => {
setConnector(universalConnector)
// Restore an existing session after a page reload
const account = universalConnector.provider.session?.namespaces.eip155?.accounts[0]
if (account) setAddress(account.split(':')[2])
})
}, [])
async function connect() {
if (!connector) return
const { session } = await connector.connect()
setAddress(session.namespaces.eip155?.accounts[0]?.split(':')[2])
}
async function disconnect() {
await connector?.disconnect()
setAddress(undefined)
}
return (
<main>
{address ? (
<>
<p>Connected: {address}</p>
<button onClick={disconnect}>Disconnect</button>
</>
) : (
<button onClick={connect} disabled={!connector}>
Connect wallet
</button>
)}
</main>
)
}Before connection, the button reads as a connect button. Once the user connects, your app shows their account and a disconnect button. If the user reloads the page, the existing session is restored, so they stay connected. Because the button is your own, you control its label, size and styling.
6. Request a signature
Once connected, your app can ask the wallet to sign a message or a transaction through the same connector. Add this function to the component from step 5, and a button that calls it:
async function signMessage() {
if (!connector || !address) return
const signature = await connector.request(
{ method: 'personal_sign', params: ['Hello from My App', address] },
'eip155:1'
)
console.log(signature)
}<button onClick={signMessage}>Sign message</button>The user approves the request in their wallet, and your app receives the signature. Any method you call must be listed in the methods array from step 4.
7. Customize the modal
Set the modal's look in modalConfig in config/index.ts. Choose a light or dark mode and set your own accent color:
modalConfig: {
themeMode: 'light',
themeVariables: { '--apkt-accent': '#3396FF' }
}8. Run and test your app
Start your development server:
npm run devOpen your app on localhost, click the button, and connect with a desktop wallet and with a mobile wallet by QR code to check each path works. Sign a message to confirm requests reach the wallet, reload the page to check the session is restored, then deploy to a domain on your allowlist.
Connect your app to the onchain ecosystem with WalletConnect
WalletConnect connects 80,000+ apps to 700+ retail, hardware and institutional wallets. One integration gives your users a wide choice of how to connect across all major blockchains, with frameworks for the web and mobile. With WalletConnect, you can support the wallets your users already have without building integrations yourself, thanks to the WalletConnect Network's battle-tested infrastructure, in production since 2018.
A connect wallet button is the front door to your app. Done well, it lets every user arrive with the wallet they already own, and leaves your team free to build the product behind the door rather than the door itself.
Are you ready to add a connect wallet button to your app or website? Integrate WalletConnect Connectivity to get started.

