Skip to content

UI: Add Avatar component #76836

@aduth

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.

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Enhancement.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions