Skip to main content

Recommended: JavaScript SDK with React Hooks

For new React apps, we recommend the JavaScript SDK with React Hooks (@dynamic-labs-sdk/react-hooks) instead of the legacy React SDK documented here. The JS SDK comes with many benefits such as a much smaller bundle size and other optimizations. Use the React quickstart (JavaScript SDK) to get started.

Summary

The useWalletOptions hook allows you to start the process of connecting to a specific wallet. It provides a function to select a wallet by wallet key. Once this function is called, the connection process begins with the caveat that:
  • If you pass in a walletKey that supports multiple chains, such as magiceden, a user will first be asked to select which chain they want to connect with. Once a chain is selected, then the user will be prompted to connect.
  • If you pass in a walletKey that includes a chain, such as magicedenbtc, then the user will skip to the connection step.
  • If a wallet does not support multiple chains, such as xverse, then the user will simply go to the connection step.

Usage

Available props Where WalletItem here is:

Examples

Example 1: Harcoded options with chain selection view
Example 2: Harcoded options without chain selection view
Example 3: Dynamically populated options with icons
Example 4: Dynamically populated options with filter
Example 5: Checking if a wallet is instaled in browser

Hook Details

Function: selectWalletOption The selectWalletOption function select a wallet to connect with. It takes a walletKey argument, which is the key of the wallet to connect with, and an optional selectGroupIfAvailable argument, which is a boolean that defaults to true. If the walletKey is also a group key (e.g. ‘metamask’, ‘phantom’, etc), it will go to the chain selection view if the selected wallet supports more than one of the chains that you have enabled for your app. If you want to skip the chain selection view, you can pass selectGroupIfAvailable = false as the second parameter and it will try to connect with the wallet that has the specified key, without showing the chain selection view. You can dynamically find the available wallet keys in walletOptions.
Last modified on June 25, 2026