Rainbow logo
RainbowKit
0.8.0

Advanced

Custom Wallet List

Customizing the wallet list

Note: This API is unstable and likely to change in the near future. We recommend avoiding changes to the wallet list for now.

You can import individual wallets from '@rainbow-me/rainbowkit/wallets' along with the connectorsForWallets function to build your own list of wallets with their necessary connectors. This way you have full control over which wallets to display, and in which order.

For example, you can choose to only show Rainbow along with generic fallback wallets.

import { connectorsForWallets } from '@rainbow-me/rainbowkit';
import { injectedWallet, rainbowWallet, walletConnectWallet, } from '@rainbow-me/rainbowkit/wallets';
import { chain, configureChains } from 'wagmi';
import { alchemyProvider } from 'wagmi/providers/alchemy';
import { publicProvider } from 'wagmi/providers/public';
const { chains } = configureChains(
[chain.mainnet],
[
alchemyProvider({ apiKey: process.env.ALCHEMY_ID }),
publicProvider(),
]
);
const connectors = connectorsForWallets([
{
groupName: 'Recommended',
wallets: [
injectedWallet({ chains }),
rainbowWallet({ chains }),
walletConnectWallet({ chains }),
],
},
]);

You can then pass your connectors to wagmi's createClient.

import { createClient, WagmiConfig } from 'wagmi';
...
const connectors = connectorsForWallets([ /* ... */ ]);
const wagmiClient = createClient({
connectors,
});
const App = () => (
<WagmiConfig client={wagmiClient}>
<RainbowKitProvider {...etc}>
{/* Your App */}
</RainbowKitProvider>
</WagmiConfig>
);

The following wallets are provided via the wallet object.

The following wallets are scoped to generic connection methods rather than specific apps. As a result, it’s recommended that these wallets are always included.

This is a fallback wallet option designed for WalletConnect-based wallets that haven’t been provided by another wallet in the list.

It's recommended that you always include this wallet in the list to ensure all WalletConnect-based wallets are supported.

import { walletConnectWallet } from '@rainbow-me/rainbowkit/wallets';
walletConnectWallet(options: {
chains: Chain[];
});

This is a fallback wallet option designed for scenarios where window.ethereum exists but hasn’t been provided by another wallet in the list. This wallet will automatically hide itself from the list when the fallback is not necessary or if there is no injected wallet available.

It's recommended that you always include this wallet in the list to ensure all injected wallets are supported.

import { injectedWallet } from '@rainbow-me/rainbowkit/wallets';
injectedWallet(options: {
chains: Chain[];
shimDisconnect?: boolean;
});

The following wallets are provided via the wallet object (in alphabetical order).

import { argentWallet } from '@rainbow-me/rainbowkit/wallets';
argentWallet(options: {
chains: Chain[];
});
import { braveWallet } from '@rainbow-me/rainbowkit/wallets';
braveWallet(options: {
chains: Chain[];
shimDisconnect?: boolean;
});
import { coinbaseWallet } from '@rainbow-me/rainbowkit/wallets';
coinbaseWallet(options: {
appName: string;
chains: Chain[];
});
import { ledgerWallet } from '@rainbow-me/rainbowkit/wallets';
ledgerWallet(options: {
chains: Chain[];
infuraId?: string;
});
import { metaMaskWallet } from '@rainbow-me/rainbowkit/wallets';
metaMaskWallet(options: {
chains: Chain[];
shimDisconnect?: boolean;
});
import { omniWallet } from '@rainbow-me/rainbowkit/wallets';
omniWallet(options: {
chains: Chain[];
});
import { rainbowWallet } from '@rainbow-me/rainbowkit/wallets';
rainbowWallet(options: {
chains: Chain[];
});
import { trustWallet } from '@rainbow-me/rainbowkit/wallets';
trustWallet(options: {
chains: Chain[];
shimDisconnect?: boolean;
});
import { imTokenWallet } from '@rainbow-me/rainbowkit/wallets';
imTokenWallet(options: {
chains: Chain[];
});

Here are a few examples of displaying different wallets, in different order.

Show MetaMask along with generic fallback wallets.

import { connectorsForWallets } from '@rainbow-me/rainbowkit';
import { injectedWallet, metaMaskWallet, walletConnectWallet, } from '@rainbow-me/rainbowkit/wallets';
const connectors = connectorsForWallets([
{
groupName: 'Recommended',
wallets: [
injectedWallet({ chains }),
metaMaskWallet({ chains }),
walletConnectWallet({ chains }),
],
},
]);

Show Rainbow, MetaMask and Coinbase along with generic fallback wallets.

import { connectorsForWallets } from '@rainbow-me/rainbowkit';
import { injectedWallet, rainbowWallet, metaMaskWallet, coinbaseWallet, walletConnectWallet, } from '@rainbow-me/rainbowkit/wallets';
const connectors = connectorsForWallets([
{
groupName: 'Suggested',
wallets: [
injectedWallet({ chains }),
rainbowWallet({ chains }),
metaMaskWallet({ chains }),
coinbaseWallet({ chains, appName: 'My RainbowKit App' }),
walletConnectWallet({ chains }),
],
},
]);

Reminder: The order of the wallets array defines the order in which wallets will be displayed in the UI.

You can use the groupName key to name different wallet groups. This is useful if you want to communicate to your users which wallets you recommend, as well as other possibile wallets.

Recommend Rainbow and MetaMask, but also offer Coinbase along with generic fallback wallets.

import { connectorsForWallets } from '@rainbow-me/rainbowkit';
import { injectedWallet, rainbowWallet, metaMaskWallet, coinbaseWallet, walletConnectWallet, } from '@rainbow-me/rainbowkit/wallets';
const connectors = connectorsForWallets([
{
groupName: 'Recommended',
wallets: [
injectedWallet({ chains }),
rainbowWallet({ chains }),
metaMaskWallet({ chains }),
],
},
{
groupName: 'Others',
wallets: [
coinbaseWallet({ chains, appName: 'My RainbowKit App' }),
walletConnectWallet({ chains }),
],
},
]);