Skip to main content
added 59 characters in body
Source Link

I'm building a React dapp and I want to allow my users to connect their Phantom wallets to it. The wallet adapter maintained by Solana does everything I need, but all the examples and docs assume that I want to use their UI component for the connect button. I want a button that I can style how I want that immediately attempts to connect to Phantom instead of prompting the user with what wallet type they want. I see a connect function in the packageuseWallet hook but can't figure out how to use it (the disconnect function works fine)is that the way to achievehow can I create my own component for this?

I'm building a React dapp and I want to allow my users to connect their Phantom wallets to it. The wallet adapter maintained by Solana does everything I need, but all the examples and docs assume that I want to use their UI component for the connect button. I want a button that I can style how I want that immediately attempts to connect to Phantom instead of prompting the user with what wallet type they want. I see a connect function in the package but can't figure out how to use it — is that the way to achieve this?

I'm building a React dapp and I want to allow my users to connect their Phantom wallets to it. The wallet adapter maintained by Solana does everything I need, but all the examples and docs assume that I want to use their UI component for the connect button. I want a button that I can style how I want that immediately attempts to connect to Phantom instead of prompting the user with what wallet type they want. I see a connect function in the useWallet hook but can't figure out how to use it (the disconnect function works fine)how can I create my own component for this?

Source Link

How do I use the Solana wallet adapter to create my own wallet connection button?

I'm building a React dapp and I want to allow my users to connect their Phantom wallets to it. The wallet adapter maintained by Solana does everything I need, but all the examples and docs assume that I want to use their UI component for the connect button. I want a button that I can style how I want that immediately attempts to connect to Phantom instead of prompting the user with what wallet type they want. I see a connect function in the package but can't figure out how to use it — is that the way to achieve this?