# useWeb3AuthDisconnect

> @web3auth/modal Vue Composables useWeb3AuthDisconnect | Embedded Wallets

Hook to disconnect from Web3Auth.

### Import

```ts

```

### Usage

```html
<script setup lang="ts">

  const { disconnect, loading, error } = useWeb3AuthDisconnect()
</script>

<template>
  <button @click="disconnect()" :disabled="loading">
    {{ loading ? "Disconnecting..." : "Disconnect" }}
  </button>
  {{ error.message }}
</template>
```

### Return type

```ts

```

#### `loading`

`Ref<boolean>`

Whether the disconnection process is in progress.

#### `error`

`Ref<Web3AuthError | null>`

Error that occurred during the disconnection process.

#### `disconnect`

`(options?: { cleanup: boolean }) => Promise<void>`

Function to initiate the disconnection process. Optional `cleanup` parameter controls whether to remove all user data.
