Avatar

Avatars represent people by displaying their initials. Hovering the avatar will show a tooltip wih the full name.

#

#

#

Avatars have three available sizes, with the default set to md

#

A tip may be rendered in the tooltip. This can be used to prompt the use to action.

#

The tooltip may be hidden if hideTooltip is true. This may be useful when a larger, container-level, tooltip is needed.

#

The avatar background and text colors will be automatically assigned, semi randomly based on the name.

#

#

  • Represent a person nearby the content they're related to. For example, avatar could be placed near the source they created.
  • As a purely visual element near the person's name.

#

  • When representing anything else, but a person.

#

If you want to vertically align the Avatar initials with text on the same line as the Avatar, the easiest way is to set the line height to match the Avatar's height. The avatar line heights are exported in theme variables.

Check the theme for specific line heights.

#

Inherits margin props.

NameDefaultDescription
name

string | undefined

User's full name

tip

string

Secondary text to show below the name in the tooltip

size"md""sm" | "md" | "lg"

The avatar size.

hideTooltipfalseboolean

Whether to hide the tooltip.

On this page

  • Example
  • Usage
  • Sizes
  • Secondary tip
  • Hiding the tooltip
  • Colors
  • Guidelines
  • When to use
  • When not to use
  • Styling
  • Props