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

267
Visualizações
Material UI ItemList Trying to bring Icon closer to element

Im trying to bring this - icon closer to the text but i'm not exactly sure how.

When I go into developer mode it shows me this.

I don't know what the purplish stuff means. My end goal is to try to move the icon to the upper right corner of where the "Steve First" box is but I'm not sure how to do that. This is the code where i'm building my list.

<List style={{ display: "flex", flexDirection: "row", padding: 0 }}>
  <ListItem
    className={classes.removePerson}
    secondaryAction={
      <IconButton
        sx={{
          zIndex: "1",
          width: "15px !important",
          height: "15px !important"
        }}
      >
        <RemoveCircleIcon sx={{ fontSize: "20px" }} />
      </IconButton>
    }
  >
    <ListItemAvatar>
      <Avatar src="stuff.img" />
    </ListItemAvatar>
    <ListItemText
      className={classes.peopleListSpacing}
      primary="Steve First Steve First Steve First"
    />
  </ListItem>
  <ListItem
    className={classes.removePerson}
    secondaryAction={
      <IconButton
        sx={{
          zIndex: "1",
          width: "15px !important",
          height: "15px !important"
        }}
      >
        <RemoveCircleIcon sx={{ fontSize: "20px" }} />
      </IconButton>
    }
  >
    <ListItemAvatar>
      <Avatar src="stuff.img" />
    </ListItemAvatar>
    <ListItemText className={classes.peopleListSpacing} primary="Steve First" />
  </ListItem>
</List>

The code display this. enter image description here

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

The purple space is available space that is not being utilized.

How about just making your ListItemAvatar a flex container and centering it? You might like to right align it, then just add some right margin.

Create a new listItemAvatar prop in your classes object.

display: flex;
justify-content: center;
<ListItemAvatar className={classes.listItemAvatar}>
  <Avatar src="..." />
</ListItemAvatar>
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