User Menu

The account menu. The trigger is an Avatar alone by default, or just the signed-in name when showName is set — the email moves into the panel instead, since the trigger no longer carries it. fullWidth additionally stretches that trigger to fill its container — the shape a drawer/footer row needs — and is ignored where the trigger sits inline among other controls (e.g. a header). The trigger (and the Avatar inside it, avatar-only) always carries Sidebar's current-page tint (bg-selected text-selected-foreground), not just on hover — it reads as a standing part of navigation rather than a generic hoverable row. With showName, the panel opens flush against the trigger and matched to its width, select-style, rather than floating free. Opening it reveals the email and a logout action — viewing preferences live in DisplayControls beside the trigger, not in here, since they are switches rather than account actions.

Avatar and named triggers

Avatar-only for a header where space is tight; showName puts the name in the trigger and folds the email into the panel instead. Either way the trigger carries Sidebar's current-page tint even at rest — the one deliberate exception to that treatment, so the account control reads as a standing part of navigation rather than a generic hoverable row.

Filling a row

fullWidth stretches the trigger to fill its container — the shape a drawer or sidebar footer row needs. It only means anything alongside showName, and is ignored where the trigger sits inline among other controls.

No user, no menu

Without a user — or without an email on it — nothing renders at all. A shell can hand the prop straight through while a session is still loading and no placeholder control appears in the meantime. Viewing preferences do not live in here: those are switches, not account actions, and belong in DisplayControls beside the trigger.

API

Prop Type Default Description
user {email: string, name?: string}

Signed-in user. Menu renders nothing when omitted or without an email.

onLogout () => void

Called when the logout action is clicked.

showName boolean false

Renders just the name as the trigger, with the email folded into the panel. Avatar-only otherwise.

fullWidth boolean false

Stretches the trigger to fill its container, e.g. a drawer footer row. Only meaningful with showName.