Skip to content
TrademarkTrademark
Docs
Components

UserMenu

Updated: May 9, 2025
View on GitHub

The UserMenu component renders a user avatar and name, and opens a dropdown for settings or account-level actions when clicked or focused. It is built on top of DropdownWrapper and Usercomponents.

Handling a choice

onSelect gets the value of the Option picked from dropdown, by click or keyboard, and the menu closes. It is DropdownWrapper's onSelect, passed through.

Loading state

You can show skeleton content while loading profile data by setting loading={true}.

API reference

Type
Default
onSelect
Called with the picked Option's value.
(value: string) => void—
selected
Mark the trigger as active while the menu is open.
booleanfalse
placement
Which side the menu opens on.
toprightbottomlefttop-starttop-endright-startright-endbottom-startbottom-endleft-startleft-end
—
dropdown
The menu contents.
React.ReactNode—
className
string—
style
React.CSSProperties—
…and every UserProps propinherited—
…and every DropdownWrapperProps propinherited—
name
string—
subline
ReactNode—
avatarProps
AvatarProps—
loading
booleanfalse
minWidth
SpacingToken—
maxWidth
SpacingToken—
minHeight
SpacingToken—
Edit this page on GitHub