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

# useWalletConnectScanner

Hook to show the WalletConnect QR scanner using the Wallet Services plugin.

info

Please note that this hook doesn't work for external wallet logins. It only works for social login embedded wallets.

### Import[​](#import "Direct link to Import")

```
import { useWalletConnectScanner } from '@web3auth/modal/react'

```

### Usage[​](#usage "Direct link to Usage")

```
import { useWalletConnectScanner } from '@web3auth/modal/react'

function WalletConnectScannerButton() {
  const { showWalletConnectScanner, loading, error } = useWalletConnectScanner()

  return (
    <div>
      <button onClick={() => showWalletConnectScanner()} disabled={loading}>
        {loading ? 'Opening Scanner...' : 'Show WalletConnect Scanner'}
      </button>
      {error && <div>{error.message}</div>}
    </div>
  )
}

```

### Return type[​](#return-type "Direct link to Return type")

```
import { type IUseWalletConnectScanner } from '@web3auth/modal/react'

```

#### `loading`[​](#loading "Direct link to loading")

`boolean`

Whether the scanner opening process is in progress.

#### `error`[​](#error "Direct link to error")

`Web3AuthError | null`

Error that occurred during the scanner opening process.

#### `showWalletConnectScanner`[​](#showwalletconnectscanner "Direct link to showwalletconnectscanner")

`(showWalletConnectScannerParams?: BaseEmbedControllerState["showWalletConnect"]) => Promise<void>`

Function to show the WalletConnect QR scanner. Accepts optional parameters for customizing the scanner behavior.
