ReactHooks
useWallets
React hook to list all available Sui wallets detected by dApp Kit.
The useWallets hook provides access to all available wallets.
All dApp Kit hooks must be used within components that are descendants of
DAppKitProvider. Using them outside will result in an error.
Usage
import { useWallets } from '@mysten/dapp-kit-react';
export function MyComponent() {
const wallets = useWallets();
return (
<div>
{wallets.map((wallet) => (
<div key={wallet.name}>
<img src={wallet.icon} alt={wallet.name} />
<span>{wallet.name}</span>
</div>
))}
</div>
);
}Return value
UiWallet[]