User Menu
Navigation · UserMenu, Card, Menu, Avatar
The signed-in account at the foot of a sidebar: avatar, name and email, opening a menu with profile, settings and sign-out.
items are Menu items (icons, shortcuts, "-" separators, danger).compact shows only the avatar, with the name as its accessible label; use it in a collapsed sidebar (footer={({ collapsed }) => <UserMenu compact={collapsed} … />}).- The menu opens above the trigger by default (
side="top"); use side="bottom" at the top of a page.
Props
| Prop | Type | Notes |
|---|
name | string | Required |
email? | string | |
avatar? | string | Picture URL; initials otherwise. |
items? | (MenuItem | "-")[] | The menu: profile, settings, sign out … |
compact? | boolean | Only the avatar (a collapsed sidebar). |
side? | "top" | "bottom" | Where the menu opens (default `top`, for the foot of a sidebar). |
className? | string | Extra class on the root element. |
style? | CSSProperties | Inline style on the root element. |
Card
| Prop | Type | Notes |
|---|
title? | string | |
description? | string | |
meta? | string[] | |
corner? | ReactNode | |
status? | ReactNode | |
actions? | ReactNode[] | |
tint? | Tint | "surface" | |
onClick? | () => void | |
children? | ReactNode | |
eyebrow? | ReactNode | |
surface? | Surface | `"glass"`: translucent glass over what is behind (maps, 3D, video, photos); `"solid"` opts out inside a glass `UIProvider`. |
className? | string | Extra class on the root element. |
style? | CSSProperties | Inline style on the root element. |
| Prop | Type | Notes |
|---|
items | (MenuItem | "-")[] | Required |
label? | string | Accessible name of the menu. |
autoFocus? | boolean | Focus the first item on mount (menus opened from a button or the keyboard). |
onClose? | () => void | Called after an item runs, and on Escape, so the owner can close the menu. |
className? | string | Extra class on the root element. |
style? | CSSProperties | Inline style on the root element. |
Avatar
| Prop | Type | Notes |
|---|
name | string | Required |
src? | string | |
size? | number | |
tint? | Tint | "surface-sunken" | |
className? | string | Extra class on the root element. |
style? | CSSProperties | Inline style on the root element. |