Wallet Modal Customization Guide
1. Basic Usage
The simplest way to use the wallet modal is to use the default TitanKitModal:
import { TitanKitModal, TitanKitProvider } from '@titan-kit/react';
function App() {
return (
<TitanKitProvider
chains={_chains}
wallets={_wallets}
assetLists={_assetLists}
walletModal={TitanKitModal} // Use default modal
>
<YourApp />
</TitanKitProvider>
);
}2. Custom Modal Component
You can create your own modal component using shadcn/ui components:
3. Modal Props
The custom modal component should accept these props from WalletModalProps:
4. Using Modal Hook
The useWalletModal hook provides access to wallet functionality:
5. Advanced Custom Modal Example
6. Best Practices
Modal Design
Use shadcn/ui components for consistent design
Follow Tailwind CSS best practices
Implement responsive design
Handle loading and error states
Wallet Integration
Support all provided wallets
Handle connection errors gracefully
Show connection status
Provide clear disconnect option
User Experience
Make wallet selection intuitive
Show wallet logos and names clearly
Provide helpful error messages
Allow easy modal closing
7. Common Issues
Modal Visibility
Ensure proper isOpen state management
Handle onOpenChange properly
Check z-index conflicts
Wallet Connection
Handle connection errors
Show loading states
Validate wallet availability
Styling Issues
Use Tailwind CSS classes effectively
Maintain consistent spacing
Handle dark/light mode
Ensure proper component composition