Skip to content

User menuPro

Your account behind the avatar: identity, a few links, an inline theme and status switch that keep the menu open, usage, and sign out with a spinner.

oxyn add user-menu
Atlas
The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

Rendered from Rust at build time · goes live when visible

When to use

  • The account menu in the app shell: identity, settings, theme, status, usage and sign out.

When not to use

  • A workspace switcher like Linear or Slack: use Team switcher instead.
  • An app sidebar: use Sidebar instead.
  • Actions and choices behind any trigger: use Dropdown Menu instead.

Installation

User menu is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.

Terminal
oxyn add user-menu

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Header

In the top bar.

Atlas
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Sidebar

From a sidebar footer, opening upward.

Atlas
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Minimal

Avatar only, links and sign out.

Atlas
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

UserMenu

PropTypeDefaultDescription
namerequiredString—Name.
emailrequiredString—Email.
planOption<String>Default::default()Plan badge.
itemsVec<(String, String, String)>Default::default()Links: (label, icon, shortcut).
show_nameboolDefault::default()Name + chevron beside the avatar.
show_themebooltrueTheme switch.
show_statusboolDefault::default()Status switch + presence dot.
themeString"system"Theme.
statusString"available"Status.
usageOption<(f32, f32)>Default::default()Oxyn plus: usage (used, limit) shown as a meter.
alignString"end"`start` · `end`.
sideString"down"`down` · `up` (from a sidebar footer).
openboolDefault::default()Start open (no focus, no backdrop).
on_themeEventHandler<String>—Theme chosen.
on_selectEventHandler<String>—Link chosen.
on_sign_outEventHandler<()>—Sign out.

PresenceDot

PropTypeDefaultDescription
statusrequiredString—`available` · `busy` · `away` · `offline`.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
EnterorSpaceor↓Open on the first row
↑Open on the last row
↑ ↓ Home EndMove, looping
← →Change theme or status
A–ZTypeahead
EscapeorTabClose and return focus

Accessibility

  • Trigger has aria-haspopup=menu, aria-expanded and “Account menu, name, status”.
  • Rows are menuitems; switches are menuitemradio groups.
  • Sign out sets aria-busy while it runs.
From the spec

Trigger “Account menu, name, status”; rows are menuitems; switches are labelled groups of menuitemradio; shortcut hints aria-hidden.

Motion & interaction

The panel scales and fades out of the avatar without overshoot; rows stagger in; the highlight follows pointer and keys.

Timing
TransitionDurationEasingReduced motion
Open200 msease.outfade
Rows200 ms staggerease.outinstant

Responsive behaviour

  • Below 640px the panel becomes a bottom sheet.
Edge cases (spec)

Below 640 px it is a bottom sheet. A menu that starts open draws no backdrop and takes no focus.

Notes for AI

  • Import UserMenu, PresenceDot from oxyn_dioxus and include PRIMITIVES_CSS plus the token stylesheet once.
  • A GPUI version exists: UserMenuEl in oxyn_gpui.
  • Props to set first: name, email, status.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI