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/solana-provider";import { ConnectWalletBtn } from "@/components/connect-wallet-btn"; export default function App() { return ( <SolanaProvider> <div className="flex justify-end p-4"> <ConnectWalletBtn /> </div> </SolanaProvider> );} .env.local
MAINNET_RPC=https://mainnet.helius-rpc.com/?api-key=your_keyDEVNET_RPC=https://devnet.helius-rpc.com/?api-key=your_keyProps / 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. |