[Avatar] Set background colour for AvatarGroup's borders
See original GitHub issueSummary 💡
Avatar group uses the background colour set for the app for the Avatar borders, but doesn’t pick up on the background colour of the div it’s within.
.MuiAvatarGroup-avatar {
border-color: var(--background-color);
}
Examples 🌈
Solution could be to either have a property to set the border colour:
<AvatarGroup backgroundColor={something} />
or to wrap each one in a div that inherits the background colour from a parent. Giving a more hands-off approach.
Motivation 🔦
Used it on a different background and expected it to work without overriding colour.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (4 by maintainers)
Top Results From Across the Web
[Avatar] Set background colour for AvatarGroup's borders
Summary Avatar group uses the background colour set for the app for the Avatar borders, but doesn't pick up on the background colour...
Read more >Can I change the border color on an avatar? - WordPress.com
My picture/avatar shows up across wordpress, on comments etc. with a black border around it. I would like that to be white if...
Read more >Avatar - Chakra UI
You can customize the background color and icon of the fallback avatar icon to match your design requirements. To update the background, pass...
Read more >Material-UI Avatar Tutorial and Examples | React.School
Avatar Color. To change the color of the Avatar component, you will need to override the styles of the component and set the...
Read more >Avatar - Naive UI
Avatar Props ; bordered, boolean, false, Whether to display a avatar with border. ; color, string, undefined, The background color of the avatar....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@WillSquire I have noticed that facebook.com uses a clip logic to solve this problem. However, I’m not sure about the added complexity. I don’t see any clear solution out of this. The
backgroundColor
color sounds like an interesting tradeoff.I have also noticed that the box model is wrong. We should change it:
Sorry to dig this up, after such a long time, but I noticed that the background/border color mismatch is very noticeable with the new paper colors in dark mode in v5.
Here is an example on an elevation12 paper:
On elevation1, it’s still noticeable: