Skip to content
rw3iss Auth

UserMenu

atom @rw3iss/auth-client/preact/atoms/UserMenu framework-adapters/preact/components/atoms/UserMenu.tsx ↗

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

NameTypeDescription
clientAuthClient
extrapreact.ComponentChildrenSlot rendered above the sign-out button — e.g. settings link.