SolanaUI

UserDropdown

The UserDropdown component is a dropdown menu that shows a user's wallet address and balances.

to see the UserDropdown component

Installation

1. Install Dependencies

UserDropdown requires Solana Wallet Adapter and must be wrapped in Connection and Wallet provider components.

2. Install shadcn/ui dropdown-menu component

Use shadcn/ui CLI or manually install the shadcn/ui dropdown-menu component.

3. Install SolanaUI Avatar

The UserDropdown component requires the Avatar component. Copy the code below to src/components/sol/avatar.tsx.

4. Install SolanaUI TokenIcon

The UserDropdown component requires the TokenIcon component. Copy the code below to src/components/sol/token-icon.tsx.

4. Install SolanaUI UserDropdown

Copy the code below to src/components/sol/user-dropdown.tsx.

5. Use UserDropdown

Import the UserDropdown component and use it in your app.