Avnology ID
Components

UserButton

Avatar + menu for signed-in users, mirrors Clerk's <UserButton/>.

<UserButton />

A floating avatar that opens a menu with the user's profile, switch-organization action, and sign-out. Suitable for app headers where you need auth surface in one component.

Import

Usage

import { UserButton } 








Props

PropTypeDefaultDescription
afterSignOutUrlstring/URL to redirect to after sign-out
showNamebooleanfalseShow first name next to avatar
showOrganizationSwitcherbooleantrueInclude org switcher in menu when user has multiple orgs
customMenuItemsArray<{ label; icon?; onClick }>[]Extra menu items above sign-out
appearance{ avatarSize?: number; menuWidth?: number }{ avatarSize: 32 }Visual overrides

Custom menu items

<UserButton




Accessibility

  • Menu opens on Enter / Space; closes on Escape.
  • Avatar has aria-label with user's display name.
  • Focus trap inside menu while open.