AvatarLabelGroup

<AvatarLabelGroup>TailwindCSS Modules

Combines an Avatar with a title and optional subtitle text. Handles text truncation automatically.

InstallationColoxo CLI
npx coloxo add avatar-label-group --style coloxo-css
ES Module ImportPlayground / npm package
import { AvatarLabelGroup } from '@coloxo/ui';

Design Tokens:

--cx-text-primary: #0F172A--cx-text-tertiary: #64748B--cx-radius-full: 9999px

1. Variant Matrix

AvatarLabelGroup supports all Avatar props (images, initials, statuses, squircle shapes).

Image (Title + Subtitle)Initials (Title Only)Status IndicatorSquircle
Default

Olivia Rhye

olivia@untitledui.com

Olivia Rhye

Olivia Rhye

olivia@untitledui.com

Olivia Rhye

olivia@untitledui.com

2. Control heights (Sizes)

Supports 3 specific sizes that scale both the avatar diameter and the typography together.

Sizes

size="sm"
Dimensions: 32px (2rem)

Olivia Rhye

olivia@untitledui.com

Dropdown menus, dense lists

size="md"DEFAULT
Dimensions: 40px (2.5rem)

Olivia Rhye

olivia@untitledui.com

Standard tables, page headers

size="lg"
Dimensions: 48px (3rem)

Olivia Rhye

olivia@untitledui.com

Profile cards, hero sections

3. Interactive Props Configurator

Include Subtitle

Rounded Avatar

Visual Render CanvasHEIGHT: 40PX

Olivia Rhye

olivia@untitledui.com

tsx
<AvatarLabelGroup  title="Olivia Rhye"  subtitle="olivia@untitledui.com"  src="https://i.pravatar.cc/150?u=a042581f4e29026704a"/>

4. Dark theme

Typography and avatar borders automatically adapt to dark backgrounds.

Olivia Rhye

olivia@untitledui.com

5. Enterprise layout compositions

Truncation is built-in. If the container is too narrow, the title and subtitle will automatically append an ellipsis (...).

Narrow Container (200px)

Christopher Columbus

christopher.columbus@longdomainname.com

Accessibility

Figure / Figcaption

The wrapper uses HTML <figure> and <figcaption> elements, providing standard semantic relationships between the avatar image and its label text.

Text Truncation

When text truncates via CSS ellipsis, ensure a native `title` attribute or tooltip is provided if the full text cannot be inferred elsewhere.

Props

NameTypeDefaultDescription
titleReactNode—Primary label.
subtitleReactNode—Secondary label.
size"sm" | "md" | "lg"mdAvatar + type scale.