Skip to main content

CnUserActionMenu

Inline popover that appears when a user's name is clicked. Shows the user's avatar, display name, and contextual communication actions — Send message, Start chat, Send email, Plan meeting — depending on which Nextcloud apps are installed (Talk, Mail, Calendar). Capabilities are fetched once per session and cached module-level.

Wraps: NcPopover, NcAvatar, NcActionButton

Try it

Loading CnUserActionMenu playground…

Usage

<!-- In a notes or tasks list, wrap the author name -->
<CnUserActionMenu
:user-id="note.actorId"
:display-name="note.actorDisplayName">
<strong>{{ note.actorDisplayName }}</strong>
</CnUserActionMenu>

<!-- Non-interactive for the current user -->
<CnUserActionMenu
:user-id="currentUser.id"
:display-name="currentUser.displayName"
:interactive="false">
{{ currentUser.displayName }}
</CnUserActionMenu>

Available actions

ActionShown whenBehavior
Send messageNextcloud Talk installedOpens a direct conversation, navigates to Talk
Start chatNextcloud Talk installedOpens a direct conversation in a new tab
Send emailUser has an email addressOpens Nextcloud Mail compose or mailto: fallback
Plan meetingNextcloud Calendar installedOpens Calendar new event with the user as attendee

Props

PropTypeRequiredDefaultDescription
userIdStringNextcloud user ID used for avatar, email lookup, and Talk conversations
displayNameString'Unknown'User display name shown in the popover header
interactiveBooleantrueSet to false to disable the popover (e.g. for the current user)
sendMessageLabelString'Send message'Label for the Talk message action
startChatLabelString'Start chat'Label for the Talk chat action
sendEmailLabelString'Send email'Label for the email action
planMeetingLabelString'Plan meeting'Label for the Calendar action
noActionsLabelString'No communication apps available'Text shown when no app is installed

Events

EventPayloadDescription
action{ type, userId }Emitted after any action is triggered; type is 'message', 'chat', 'email', or 'meeting'

Slots

SlotDescription
defaultThe trigger element (rendered as a clickable span). Defaults to displayName text

Reference (auto-generated)

The tables below are generated from the SFC source via vue-docgen-cli. They reflect what's actually in CnUserActionMenu.vue and update automatically whenever the component changes.

Props

NameTypeRequiredDefaultDescription
userIdstringThe Nextcloud user ID
displayNamestring() =&gt; t('nextcloud-vue', 'Unknown')The user's display name
interactivebooleantrueWhether the menu is interactive (false for current user or system accounts)
sendMessageLabelstring() =&gt; t('nextcloud-vue', 'Send message')
startChatLabelstring() =&gt; t('nextcloud-vue', 'Start chat')
sendEmailLabelstring() =&gt; t('nextcloud-vue', 'Send email')
planMeetingLabelstring() =&gt; t('nextcloud-vue', 'Schedule meeting')
noActionsLabelstring() =&gt; t('nextcloud-vue', 'No communication apps available')

Events

NamePayloadDescription
action

Slots

NameBindingsDescription
default