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

# useCurrentAccount

React hook to get the currently selected wallet account in a Sui dApp.



The `useCurrentAccount` hook provides access to the currently selected account.

<Callout type="warn">
  All dApp Kit hooks must be used within components that are descendants of
  [`DAppKitProvider`](../dapp-kit-provider). Using them outside will result in an error.
</Callout>

## Usage

```tsx
import { useCurrentAccount } from '@mysten/dapp-kit-react';

export function MyComponent() {
	const account = useCurrentAccount();

	if (!account) {
		return <div>No account selected</div>;
	}

	return (
		<div>
			<p>Address: {account.address}</p>
			<p>Label: {account.label}</p>
		</div>
	);
}
```

## Return value

```tsx
UiWalletAccount | null;
```
