Mysten Labs SDKs
Wallet components

ConnectButton

The ConnectButton shows the user a button to connect and disconnect a wallet. It automatically uses the connected state to show a connect or disconnect button.

import { ConnectButton } from '@mysten/dapp-kit';

export function YourApp() {
	return <ConnectButton />;
}

Props

All props are optional.

  • connectText = "Connect Wallet" - The text that displays in the button when the user is not currently connected to a wallet.
  • walletFilter - A filter function that receives a wallet instance, and returns a boolean indicating whether the wallet should be displayed in the wallet list. By default, all wallets are displayed.

On this page