Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

271
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!