Wallet Disconnect
wallet-ui/wallet-disconnectFreeComponent
A button to disconnect the connected Solana wallets
Install it
npx shadcn@latest add https://registry.wallet-ui.dev/r/wallet-disconnect.jsonSource
1'use client';23import * as React from 'react';4import { useWalletUi } from '@wallet-ui/react';5import { Button } from '@/registry/wallet-ui/ui/button';67function WalletDisconnect(props: React.ComponentProps<typeof Button>) {8 const { connected, disconnect } = useWalletUi();9 return (10 <Button11 variant="outline"12 className='cursor-pointer'13 {...props}14 onClick={disconnect}15 disabled={!connected}16 >17 Disconnect18 </Button>19 );20}212223export { WalletDisconnect }
What it pulls in
npm packages
Other registry items
Files it writes
More from wallet-ui
All 4 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Cluster Dropdowncluster-dropdown | wallet-ui | Components | Free | 1 dep | |
| Solana Providersolana-provider | wallet-ui | Components | Free | 4 deps · 3 files | |
| Wallet Dropdownwallet-dropdown | wallet-ui | Components | Free | 1 dep |
