For the complete documentation index, see llms.txt. This page is also available as Markdown.

Account dropdown menu

The account dropdown menu is displayed on the right side of the CSPR.click top bar after the user connects a wallet. CSPR.click always includes the session actions needed to switch account and sign out. You can add prebuilt menu items and custom application actions before those session actions.

Account dropdown menu setup

Configure the account dropdown menu with the accountMenuItems property in window.clickUIOptions. The array can contain prebuilt item literals and custom menu item objects.

Prebuilt menu items

CSPR.click provides these prebuilt account menu item literals:

Literal
Description

AccountCardMenuItem

Displays account information, including account name, public key, and balance.

CopyHashMenuItem

Copies the connected account hash to the clipboard.

BuyCSPRMenuItem

Opens the Topper by Uphold widget in a new tab.

Account card

Add AccountCardMenuItem to render a card with connected account information at the top of the dropdown menu. The card includes the account name, public key, and balances.

Copy public key

Add CopyHashMenuItem to render a menu item that copies the connected account hash to the clipboard.

Buy CSPR

Add BuyCSPRMenuItem to render a menu item that opens the Topper by Uphold widget in a new tab. This lets users top up their account with a card payment.

Custom menu item

Use a custom menu item object when you want to add an application-specific action. A custom item has a label, an icon, and an onClick handler. You can also add a small badge next to the label.

Valid badge variation values are green, blue, violet, and gray.

Last updated