> For the complete documentation index, see [llms.txt](/llms.txt)

# Disconnect Wallet

Programmatically disconnect from a Sui wallet using the dApp Kit disconnectWallet action.



The `disconnectWallet` action terminates the connection with the currently connected wallet.

<Callout>
  The [Connect Button](../web-components/connect-button) Web Component provides a complete wallet
  connection UI.
</Callout>

## Usage [#usage]

<Callout type="info">
  The disconnect action clears the connection state locally and attempts to notify the wallet. Even
  if the wallet notification fails, the local state is always cleared to ensure a clean
  disconnection.

  Wallets might or might not implement the `disconnect` feature. Calling `disconnectWallet`
  does not necessarily mean that the wallet accounts are disconnected from the app within the
  wallet itself. This is determined by each wallet's implementation.
</Callout>

```typescript
import { createDAppKit } from '@mysten/dapp-kit-core';

const dAppKit = createDAppKit({
	/* config */
});

await dAppKit.disconnectWallet();
```

## Parameters [#parameters]

None.

## Return value [#return-value]

Returns a `Promise` that resolves to `void` when the disconnection is complete.

<Callout>
  The action might throw `WalletNotConnectedError` if no wallet is connected. However,
  wallet-specific disconnect failures are logged but don't prevent the local connection state from
  being cleared.
</Callout>
