Skip to content

Add a Tooltip to the Avatar in a Persona #32412

Answered by behowell
wfwf1997 asked this question in Q&A
Discussion options

You must be logged in to vote

Another option is to use a render function for the avatar slot. See the documentation for how to do that here: https://react.fluentui.dev/?path=/docs/concepts-developer-customizing-components-with-slots--docs#replacing-the-entire-slot

Here's a stackblitz showing that: https://stackblitz.com/edit/b7edwo-fhd4jz?file=src%2Fexample.tsx

import * as React from 'react';
import {
  Persona,
  Tooltip,
  Avatar,
  AvatarProps,
} from '@fluentui/react-components';

export const PersonaWithTooltipExample = () => {
  return (
    <Persona
      name="Kevin Sturgis"
      secondaryText="Available"
      presence={{ status: 'available' }}
      avatar={{
        image: {
          src: 'https://res-1.c…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@wfwf1997
Comment options

@wfwf1997
Comment options

Answer selected by wfwf1997
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants