Installation
pnpm dlx shadcn@latest add @wallet-kit/menu
Usage
import { WalletMenu } from "@/components/wallet/menu"
export default function Demo() {
return <WalletMenu />
}API Reference
WalletMenu
A dropdown menu component that provides wallet management actions. Only displays when a wallet is connected.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
variant | string | "default" | The button variant style. |
className | string | - | Additional CSS classes. |
Inherits all props from shadcn/ui DropdownMenu.
Behavior
- Not Connected: Renders
null(hidden) - Connected: Displays a dropdown menu with:
- Wallet icon and ellipsified address
- Copy address action (shows toast notification)
- Disconnect action
- Error handling for wallet operations
Menu Items
- Copy Address: Copies the connected account address to clipboard and shows a toast
- Disconnect: Disconnects the current wallet
Examples
Basic Menu
import { WalletMenu } from "@/components/wallet/menu"
export default function Header() {
return (
<header>
<WalletMenu />
</header>
)
}With Custom Variant
import { WalletMenu } from "@/components/wallet/menu"
export default function Demo() {
return (
<WalletMenu variant="outline" />
)
}- The component automatically handles wallet connection state
- Copy action uses the browser's clipboard API
- Toast notifications are shown using
sonner - Error handling is integrated via
WalletErrorDialog
Last updated 11/21/2025