Skip to main content

ActionPersona

ActionPersona displays a user as a persona (avatar + name) and reveals a hover card with quick actions — email, and optionally a Microsoft Teams chat. Point it at a SharePoint site for automatic profile pictures, or supply the picture URL yourself.

When to use

  • Show a person in a card, table cell, or header with quick contact actions.
  • People-centric UIs (owners, assignees, authors) in SharePoint or Code Apps.

Import

import { ActionPersona } from '@spartanfx/react';

Basic usage

user is required — at minimum an email and a display title.

<ActionPersona
user={{
email: 'ada@contoso.com',
title: 'Ada Lovelace',
secondaryText: 'Engineering Lead',
}}
baseUrl="https://contoso.sharepoint.com/sites/projects"
/>

Teams chat and sizing

import { ActionPersona } from '@spartanfx/react';
import { PersonaSize } from '@fluentui/react';

<ActionPersona
user={{ email: 'ada@contoso.com', title: 'Ada Lovelace' }}
profilePictureUrl="https://…/ada.jpg"
size={PersonaSize.size48}
allowTeamChat
shadow
/>

Key props

PropTypeNotes
user (required)IActionPersonaUseremail + title, plus optional secondaryText / tertiaryText.
baseUrlstringSharePoint site root — used to resolve the profile picture.
profilePictureUrlstringExplicit picture URL (alternative to baseUrl).
allowTeamChatbooleanShow a Microsoft Teams chat action.
sizePersonaSizePersona size variant.
shadowbooleanElevated shadow with subtle glow.
accentColorstringHighlight color (defaults to theme primary).

See the full generated reference: ActionPersona API ↗.

See also