Skip to content
Mosaic
On this page

Entity

A media-and-text row for one user, organization or other thing: an avatar or icon beside a label and a one-line description.

Use for

  • a user or organization cell in a table
  • an avatar beside a name and email
  • a list row that names one thing

Practices

GuidancePractice
DoPut the label and description inside Entity.Content, beside Entity.Media.
DoUse Avatar.Root with size="fit" in Entity.Media, so the media box sizes it.

API reference

Entity.Root

The row, as a div.

Slot: cl-entity

Entity.Media

The leading avatar or icon box.

Slot: cl-entity-media

Entity.Content

Stacks the label and description.

Slot: cl-entity-content

Entity.Label

The name. Runs of text truncate to one line; element children such as icons pass through.

Slot: cl-entity-label

Entity.Description

Secondary text. Truncates to one line.

Slot: cl-entity-description

Examples

A member

TSX
<Entity.Root>
  <Entity.Media>
    <Avatar.Root size='fit'>
      <Avatar.Image src={member.imageUrl} alt="" />
      <Avatar.Fallback />
    </Avatar.Root>
  </Entity.Media>
  <Entity.Content>
    <Entity.Label>{member.name}</Entity.Label>
    <Entity.Description>{member.email}</Entity.Description>
  </Entity.Content>
</Entity.Root>