Skip to content

UI: Add Avatar component #76836

Closed

Description

@aduth

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:

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.

Activity

  1. aduth commented on Mar 30, 2026

    @aduth
    MemberAuthor

    Copying some implementation notes shared by @ciampo in #75591 (comment) :

    • We should use Base UI's Avatar under the hook
    • I'd consider removing gravatar support and keep Avatart as a UI component. We can keep gravatar integration as a dedicated Storybook example, and potentially consider greating a higher-level dedicated component, coupled with the gravatar APIs
    • I'd consider whether AvatarGroup deserves to be a dedicated component, since it's basically a horizontal stack with negative margin — we could even consider tweaking Stack to support this use case?
    • a deeper API surface review, to make sure we have good consistency with other components in the package
  2. simison commented on Apr 1, 2026

    @simison
    Member

    What I'd expect is that there is an Avatar component in @wordpress/ui, and a separate Gravatar component alongside HoverCards in the Gravatar packages. I'd expect these Gravatar + Avatar components to work really well together in the WP world for plugins to build things upon them, and profiles to look consistent across WP and plugins. The Gravatar component could even be already registered and shipped with WP.

    In fact, the existing Commenting settings are so tied to Gravatar that going directly to Gravatar support might even make sense:

    Image

    If the user chooses one of the default avatars, they should likely expect all interfaces at least in WP to follow along.

    We've done a couple of Gravatar components at a8c around a few projects; these might work as inspiration:

  3. aduth commented on Apr 2, 2026

    @aduth
    MemberAuthor

    Yeah, I agree the component in @wordpress/ui should be pretty low-level and support (but not bake-in) use-cases for higher-level abstractions like Gravatar or HoverCards components.

    Another high-level component within the Gutenberg context might end up being one that wires up the Avatar component using the user object (specifically avatar_urls, using get_avatar_url), which in turn would likely be sourced from Gravatar, but not inherently tied.

  4. self-assigned this
    on Oct 7, 2026
  5. aduth commented on Oct 14, 2026

    @aduth
    MemberAuthor

    @ciampo With #84145 having been merged (🎉), should we consider this issue complete? Was there a reason you chose to not use the "Closes" auto-closing language in your pull request?

  6. ciampo commented on Oct 14, 2026

    @ciampo
    Contributor

    We can close.

    The component will receive substantial improvements in #84653 and will need to expose additional first-party support for assigning a color to different users when collaborating, but those can be considered follow-ups

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions