
WalletModal
offers users multiple wallet connection options. The modal automatically appears when users click the ConnectWallet
component and provides several connection paths:
- Quickly create a new smart wallet for new users
- Coinbase Wallet connection (supporting both smart wallets and EOA)
- MetaMask connection
- Phantom connection
- Rabby, Frame, and Trust Wallet connections (optional)
Walkthrough
1
Configure the OnchainKitProvider with modal settings:
providers.tsx
2
Use the ConnectWallet component in your UI:
App.tsx
Components
The Wallet Modal components are designed to work together hierarchically:<OnchainKitProvider />
- Configures the modal settings and appearance<ConnectWallet />
- Triggers the modal to open when clicked<WalletModal />
- The modal interface itself, containing:- Smart wallet creation flow
- Coinbase Wallet connection
- MetaMask connection
- Phantom connection
- Rabby, Trust, and Frame Wallet connections (if enabled)
- Terms and privacy policy links
- Wallet connection states
- Error handling
- Mobile/desktop responsive behavior
- Theme customization
- Terms/privacy policy display
Additional Wallet Support
By default, the wallet modal includes Coinbase Wallet, MetaMask, and Phantom as connection options. You can enable additional wallet support by configuring thesupportedWallets
object in the OnchainKitProvider
:
supportedWallets
configuration is provided, the additional wallets will be disabled by default.