Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

242
Visualizações
show name of the user on hover on material ui Avatar component

Hi i have a profile page in my website and i am displaying the image of the profile holder using the material-ui Avatar component i want to show the name of the profile holder in the center of avatar and the sample code is given blow

        <div {...otherProps} style={{ display: 'block', margin: 'auto' }}>
            <StyledBadge
                overlap="circular"
                anchorOrigin={{
                    vertical: 'bottom',
                    horizontal: 'right',
                }}
                variant={showBadge ? "dot" : "standard"}
            >
                <Avatar alt="avatar" src={src || defaultImg} className={clsx(classes.avatar, classes[size])} />
            </StyledBadge>
    </div>
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You can use Tooltip component from MUI:

import Tooltip from "@material-ui/core/Tooltip";
import Avatar from "@material-ui/core/Avatar";

...

<Tooltip title={userName}>
  <Avatar src={userProfilePicture}></Avatar>
</Tooltip>

See also Tooltip material doc page

Codesandbox exemple

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda