UserMenu
Header-level user menu — avatar trigger + dropdown with profile info and sign-out. Anchors absolute-positioned panel to the trigger; closes on outside click + Escape.
Drop into your app header alongside AuthLoading / GuestOnly so
the trigger renders only when authenticated:
<ProtectedRoute fallback={Sign in}>
Usage
import { UserMenu } from '@rw3iss/auth-client/preact/atoms';
<UserMenu />Props
| Name | Type | Description |
|---|---|---|
client | AuthClient | |
extra | preact.ComponentChildren | Slot rendered above the sign-out button — e.g. settings link. |
onIdentityClick | () => void | Make the identity block (name + email) interactive — e.g. link to the user’s profile. Provide `onIdentityClick` for SPA routers (called, then the menu closes) and/or `identityHref` for plain anchor navigation. When neither is set the block is static. / |
identityHref | string |