File

packages/components/eui-avatar/avatar-content/avatar-content-label.component.ts

Description

Component for displaying the primary label text within avatar content. Typically used to show the user's name or primary identifier. Content is projected via ng-content and styled as the main text line. Must be used within eui-avatar-content for proper styling and layout.

Example :
<eui-avatar>
  <eui-avatar-image src="user.jpg"></eui-avatar-image>
  <eui-avatar-content>
    <eui-avatar-content-label>John Doe</eui-avatar-content-label>
    <eui-avatar-content-sublabel>Developer</eui-avatar-content-sublabel>
  </eui-avatar-content>
</eui-avatar>

Accessibility

  • Text content is directly readable by screen readers
  • Appears first in reading order before sublabel
  • Use concise, meaningful text for user identification

Notes

  • Must be child of eui-avatar-content component
  • Styled as primary/prominent text
  • Typically displays user name or entity title
  • Can be used alone without sublabel if needed

Metadata

Index

Methods

Methods

cssClasses
cssClasses()

Binds the CSS class 'eui-avatar-list' to the host element. This class provides the styling necessary for arranging avatars in a list.

Returns : string

The CSS class name

results matching ""

    No results matching ""