Skip to main content

Figma Storybook

Avatar

Displays a user's profile image, initials, or a fallback icon to represent a person or organisation. Use to identify users in lists, comments, assignments, and profile surfaces. Don't use as a decorative element — always pair with a name or accessible label.

Figma Storybook Docs

Description

What it does

Renders a circular or square container showing a user's photo, their initials derived from their name, or a generic person icon as a fallback. Sizes range from extra-small (used in dense data tables) to large (used in profile headers).

Where it appears

Comment threads on consultations, stakeholder and contact list rows, task assignment fields, activity feeds, user profile headers, and team member panels.

Why it exists

Government engagement platforms involve many named participants — councillors, community members, internal officers. A consistent avatar treatment reduces visual noise while keeping content clearly attributed, and ensures people can quickly identify who said or did something without reading every name.

Dependencies

Badge, Tooltip

Anatomy

PartRequired?Notes
Container Required Circular (default) or square shape. Clips the image or centres the initials/icon. Size variants control the container's width and height.
Image Optional User-supplied photo. Rendered as a background image or <img> element. If the image fails to load, the component falls back to initials, then to the generic icon.
Initials label Optional One or two characters derived from the user's display name (e.g. 'BM' for Bonnie Mercer). Shown when no image is available. Uses --op-font-body at a size proportional to the container.
Fallback icon Recommended A generic person silhouette icon rendered when neither image nor initials are available. Uses wa-icon internally.
Status indicator Optional A small dot overlaid on the bottom-right corner of the container. Uses --op-color-status-* tokens to communicate online, away, busy, or offline presence. Not used in Open Point or Social Point at this time.
Accessible label Required An aria-label or visually-hidden text string that names the person or entity. Must always be present — the visual representation alone is not sufficient.

Variants

Image

Displays the user's actual profile photo

When the user has uploaded a photo and the image URL is available and trusted

Initials

Displays one or two characters from the user's name on a coloured background

When no photo is available but the user's name is known; preferred over the icon fallback for named users

Icon (fallback)

Displays a generic person silhouette

When neither a photo nor a name is available, or when representing an anonymous or unknown participant

Square

Represents an organisation or non-person entity

Organisation logos, agency crests, or system accounts where a circular shape would imply a person

Sizes

xsmall · 16px
small · 24px
medium · 32px
large · 48px
xlarge · 64px

States

DEFAULT
FOCUSED (WHEN INTERACTIVE)
HOVERED (WHEN INTERACTIVE)
SELECTED / ACTIVE
State Behaviour
Default Displays image, initials, or icon at rest. No interactive affordance unless wrapped in a link or button.
Image loading Shows a neutral background using --op-color-bg-subtle while the image fetches. Transitions to image, initials, or icon on load or error.
Image error Falls back automatically to initials if a name is available, or the generic icon if not. No broken-image indicator is shown.
Focused (when interactive) When the avatar is wrapped in an anchor or button, focus ring appears: 3px solid --op-color-interactive-focus, offset 2px. The ring follows the container shape (circle or square).
Hovered (when interactive) Slight overlay using --op-color-bg-overlay at reduced opacity signals the element is clickable. Cursor changes to pointer.
Selected / active A border or ring using --op-color-interactive-default distinguishes a selected avatar in a multi-select or assignment UI.

Usage guidelines

When to use

  • Attribute a comment, note, or action to a named person in a consultation or engagement activity.
  • Show which officer is assigned to a stakeholder record or task in Open Point.
  • Display participants in a team or working group panel.
  • Represent the signed-in user in a navigation bar or account menu.

When not to use

  • Do not use as a decorative illustration — every avatar must correspond to a real person, organisation, or authenticated account.
  • Do not use for status icons, category icons, or abstract concepts — use wa-icon or Badge instead.
  • Do not use the XSmall (16px) variant without an immediately adjacent visible name; it cannot be read in isolation.
  • Do not stack more than five avatars in an overflow group without a count indicator showing the total — use an avatar group pattern with a '+N' overflow badge.

Do / Don't

Do

Always provide an aria-label or visually-hidden name so screen reader users hear who the avatar represents.

Don't

Don't rely on image alt text alone — alt text is suppressed when the image fails to load and initials are shown instead.

Do

Use the initials variant when a name is known but no photo is available — it is more personal and easier to distinguish than the generic icon.

Don't

Don't show a generic icon when the user's name is available; it erodes trust and makes attribution harder.

Do

Pair every avatar with a visible name label in data tables, lists, and comment threads.

Don't

Don't use an avatar alone as the only identifier in a table row — government users often need to copy or read a full name.

Do

Use the square variant consistently for organisations and the circular variant for people.

Don't

Don't mix circle and square shapes for the same entity type within the same view.

Was this page helpful?

Updated 9 September 2026