Component
Wallet Connect Button
Connects a Solana wallet and displays the current connection state.
Preview
Installation
terminal
$npx shadcn@latest add https://uxdotsol.xyz/r/connect-wallet-btn.jsonUsage
usage
import { SolanaProvider } from "@/components/uxdotsol/components/solana-provider";import { ConnectWalletBtn } from "@/components/uxdotsol/components/connect-wallet-btn"; export default function App() { return ( <SolanaProvider> <div className="flex justify-end p-4"> <ConnectWalletBtn /> </div> </SolanaProvider> );} .env.local
MAINNET_RPC=YOUR_MAINNET_RPC_URLDEVNET_RPC=YOUR_DEVNET_RPC_URLProps / Arguments
| Name | Type | Default | Description |
|---|---|---|---|
| menuOpen | boolean | false | Current open/closed state of the mobile navigation menu. Drives the hamburger ↔ close icon. |
| onMenuToggle | (open: boolean) => void | undefined | Called when the mobile menu toggle is pressed. Receives the new boolean state. |
| className | string | '' | Optional Tailwind / CSS class applied to the outermost flex wrapper. |
| showMenuToggle | boolean | true | Controls whether the mobile navigation toggle is rendered beside the wallet control. |

