Overview
The<UserButton /> component provides a dropdown interface for authenticated users to access their profile, account settings, switch between users, and sign out. It displays the user’s avatar and name, with a dropdown menu containing account management options.
Basic Usage
Props
Whether to display the user’s name next to their avatar in the button.
What it includes
The component automatically renders based on the authenticated user:User Information Display
- User Avatar - Profile image or initials if no image uploaded
- User Name - Full name (first name + last name) when
showNameis true - Online Status - Visual indicator when user is active
Dropdown Menu Options
- Manage Account - Opens account settings and profile management
- Switch Users - Allows switching between multiple user sessions (if enabled)
- Sign Out - Signs out the current user and redirects to sign-in page
Related Components
<SignInForm />- User authentication form<SignUpForm />- User registration form<ManageAccount />- Account management interface<OrganizationSwitcher />- Organization selection<SignedIn />- Conditional rendering for authenticated users
