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

# Switch Account

Switch the active account in the connected wallet using the dApp Kit switchAccount action.



The `switchAccount` action changes the currently selected account to a different account from the
connected wallet.

<Callout type="info">
  The current account is a dApp Kit concept that tracks which account is active within your
  application. Changing the active account in the app does not affect the wallet itself, and wallets
  are not notified when the active account changes.
</Callout>

<Callout>
  Account switching is integrated into the [Connect Button](../web-components/connect-button) Web
  Component. When a wallet is connected with multiple accounts, the button provides an account
  selector.
</Callout>

## Usage [#usage]

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

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

// Switch to a different account
dAppKit.switchAccount({
	account: anotherAccount, // UiWalletAccount from the connected wallet
});
```

## Parameters [#parameters]

* **`account`:** `UiWalletAccount` - The account to switch to. Must be an account that belongs to
  the currently connected wallet.

## Return value [#return-value]

Returns `void`. The action completes synchronously and updates the connection state immediately.
