Avatar

Updated:

Use for displaying photos, initials, or icons for people, businesses, or accounts.

Properties

Learn more about properties.

icon

A q2-icon to display as the fallback.

initials

A set of up to four initials to display as capitalized text. Takes priority over name.

name

The name associated with the avatar. The initials of the first and last words provided will display as capital letters.

We recommend always providing a name when you want the avatar to be presented to screen readers.

size

Determines how large to make the avatar

src

Displays the image provided by the user.

Dependencies

This component uses other components in the Tecton library, including:

  • q2-icon

Dependents

Other components in the Tecton library use this component, including:

  • q2-card

Accessibility

Accessibility Report

Tecton components are designed and tested to be WCAG compliant when used appropriately, and do not get released without proper validation. Developers should prefer not to set ARIA attributes when using components from the Tecton Design System.

CSS Variables

The following CSS variables are available to override the default theme styles of the q2-avatar component.

Dependencies

Many Tecton components consume other components to maintain visual and functional consistency. If you are looking for a CSS variable you think should exist but are not seeing it, it may be defined in one of the dependent components below. Either way, if you think it's something we should expose more conveniently, let us know!