Skip to main content

Customize the UI

When using Embedded Wallet with the ConnectWallet component, you can customize the UI of the modal & button.

embeddedWalletConfig contains the default config for metadata and UI. you can optionally choose to override the defaults to customize the look and feel.

Build a Custom UI

the ConnectWallet component allows for overriding:

  • The name, icon and upsell links for the wallet
  • The selection UI - the UI before the users selects the wallet
  • The connection UI - the UI after the user selects the wallet
import { embeddedWallet } from "@thirdweb-dev/react";

const embeddedWalletConfig = embeddedWallet();

// change the name
embeddedWalletConfig.meta.name = "...";
// change the icon
embeddedWalletConfig.meta.iconURL = "...";
// override connection UI
embeddedWalletConfig.connectUI = embeddedWalletConnectUI; // your react component
// custom selection UI
embeddedWalletConfig.selectUI = embeddedWalletSelectUI; // your react component

You can then pass the customized embeddedWalletConfig to the ThirdwebProvider component in supportedWallets. You can then use it with ConnectWallet component or useConnect hook as shown below

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

// add to ThirdwebProvider
<ThirdwebProvider
supportedWallets={[embeddedWalletConfig]}
clientId="your-client-id"
>
<App />
</ThirdwebProvider>

// then use the ConnectWallet component
<ConnectWallet />

// or use it with useConnect hook
const connect = useConnect();
connect(embeddedWalletConfig, connectOptions);