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-menuThe preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
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.
oxyn add user-menuUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Header
In the top bar.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Sidebar
From a sidebar footer, opening upward.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Minimal
Avatar only, links and sign out.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
UserMenu
| Prop | Type | Default | Description |
|---|---|---|---|
namerequired | String | — | Name. |
emailrequired | String | — | Email. |
plan | Option<String> | Default::default() | Plan badge. |
items | Vec<(String, String, String)> | Default::default() | Links: (label, icon, shortcut). |
show_name | bool | Default::default() | Name + chevron beside the avatar. |
show_theme | bool | true | Theme switch. |
show_status | bool | Default::default() | Status switch + presence dot. |
theme | String | "system" | Theme. |
status | String | "available" | Status. |
usage | Option<(f32, f32)> | Default::default() | Oxyn plus: usage (used, limit) shown as a meter. |
align | String | "end" | `start` · `end`. |
side | String | "down" | `down` · `up` (from a sidebar footer). |
open | bool | Default::default() | Start open (no focus, no backdrop). |
on_theme | EventHandler<String> | — | Theme chosen. |
on_select | EventHandler<String> | — | Link chosen. |
on_sign_out | EventHandler<()> | — | Sign out. |
PresenceDot
| Prop | Type | Default | Description |
|---|---|---|---|
statusrequired | String | — | `available` · `busy` · `away` · `offline`. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| EnterorSpaceor↓ | Open on the first row |
| ↑ | Open on the last row |
| ↑ ↓ Home End | Move, looping |
| ← → | Change theme or status |
| A–Z | Typeahead |
| EscapeorTab | Close 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
| Transition | Duration | Easing | Reduced motion |
|---|---|---|---|
| Open | 200 ms | ease.out | fade |
| Rows | 200 ms stagger | ease.out | instant |
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,PresenceDotfromoxyn_dioxusand includePRIMITIVES_CSSplus the token stylesheet once. - A GPUI version exists:
UserMenuElinoxyn_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.