# Account dropdown menu

You can customize the account dropdown menu in our top bar with your own menu items. Options to switch to another account and sign out are always present at the end of the list. The rest, depends on your needs. We provide a couple of common menu item components you may add, and one component for you to include anything you need.

<figure><img src="https://595455488-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuweqIvQXaJrOwx2LPs49%2Fuploads%2Fgit-blob-3fde4ecb422e7d4739043275a5b1c3718b6c5b9c%2Faccount-dropdown.png?alt=media" alt=""><figcaption></figcaption></figure>

## Account dropdown menu set up

To customize the account dropdown menu, add the menu items you want to display into an array:

```tsx
const accountMenuItems = [
  <ViewAccountOnExplorerMenuItem key={0} />,
  <CopyHashMenuItem key={1} />,
  <AccountMenuItem
    key={2}
    onClick={() => {
        window.location.href = 'https://cspr.click';
    }}
    icon={CSPRClickIcon}
    label={'CSPR.click docs'}
    badge={{ title: 'new', variation: 'green' }}
  />,
];
```

Then, add the array to the `<ClickUI>` component:

```tsx
<ClickUI
    topBarSettings={{
        accountMenuItems
    }}
/>
```

## Prebuilt menu items

### View account on CSPR.live

```tsx
<ViewAccountOnExplorerMenuItem />
```

Renders a menu item in the account dropdown menu to open the CSPR.live account page in a new tab.

### Copy public key

```tsx
<CopyHashMenuItem />
```

Renders a menu item in the account dropdown menu to copy the connected public key to the clipboard.

### Buy CSPR

```tsx
<BuyCSPRMenuItem />
```

Renders a menu item in the account dropdown menu to open the [Topper by Uphold](https://www.topperpay.com/) widget on a new tab. This widget allows the user to top-up his account with a credit card payment.

### Custom menu item

```tsx
<AccountMenuItem
  onClick={() => {
    window.location.href = 'https://docs.cspr.click';
  }}
  icon={CSPRClickIcon}
  label={'CSPR.click docs'}
  badge={{ title: 'new', variation: 'green' }}
/>
```

Renders a menu item in the account dropdown menu with a custom text, icon, and handler action.

Optionally, you can add a small badge right to the menu item title. Valid variation values are `green`, `blue`, `violet`, and `gray`.
