-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Description
What problem does this address?
In building admin UIs, there is and will be a need to display user avatars, and we should expect this to be standardized and adopting design tokens.
Avatar and AvatarGroup components exist in the @wordpress/editor package as of #75652, which in turn built on #75595 and #75591. This is used today in the real-time collaborative editing feature.
Future use-cases could include current user indicators (e.g. sidebar mockups in #70913), user management screens, etc.
What is your proposed solution?
Add an Avatar component to @wordpress/ui.
Prior art in other design systems and component libraries:
- https://base-ui.com/react/components/avatar
- https://chakra-ui.com/docs/components/avatar
- https://coss.com/ui/docs/components/avatar
- https://shopify.dev/docs/api/shop-minis/components/primitives/avatar
- https://atlassian.design/components/avatar/examples
This should ideally be used in place of (or wrapped by) the existing implementation in @wordpress/editor and should support existing behaviors. This doesn't necessarily mean it should follow the exact API as the existing component, but it should be possible to implement all of what already exists today (including through custom extension).
The scope of this issue doesn't necessarily include AvatarGroup. It's not clear to me there's a demonstrated wide use-case for this, and it could continue to exist as a component specific to the @wordpress/editor package.
I'm adding "Needs Design" label, since while this already exists in the UI today, we don't have any standardized design specs around this, and it doesn't exist in the Figma library.