Profile menu
Avatar-triggered account menu that moves identity, settings, and sign-out actions out of crowded application headers.
Preview
Account actions Icons are consumer-supplied React nodes, so apps can use their existing Lucide set.
API
React props (NxKit)
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
name | ReactNode | — | Required | Visible identity and trigger label. |
email | ReactNode | undefined | Secondary identity line inside the panel. | |
initials | ReactNode | — | Required | Fallback avatar content. |
avatar | ReactNode | undefined | Optional profile image/node replacing the initials avatar. | |
chevron | ReactNode | "⌄" | Optional consumer icon, e.g. Lucide ChevronDown. | |
triggerLabel | string | — | Required | Accessible trigger name. |
items | NxMenuItem[] | — | Required | Profile/settings/sign-out actions, including consumer-provided icons. |
Classes
| Class | Description |
|---|---|
.nx-profilemenu | Relative trigger/panel root |
.nx-profilemenu__trigger | Avatar-first 44px account trigger |
.nx-profilemenu__panel | Right-aligned overlay panel |
.nx-profilemenu__identity | Name/email context above NxMenu |
States
compact
Accessibility
- The trigger exposes aria-haspopup, aria-expanded, and aria-controls; the open menu receives focus and supports the NxMenu keyboard contract.
- Escape and item activation close the panel and restore focus to the trigger; outside click closes without stealing focus.
Do / Don’t
- Do: Nest profile, account settings, and sign out here with clear icons and a danger treatment for sign out.Don’t: Don't scatter identity and sign-out controls across the top bar — keep the header focused on global context and navigation.