Logo

Component Blueprint

X: 1280 · Y: 720 · Grid: 8px

Avatar

Identity visuals with image, fallback, badge, and grouping patterns.

01 Hero Preview

Grid: 8px · Scale: 1:1

Sarah Chen SC 4 Maya Torres MT Jordan Reed JR @

02 Usage

TS

import { FrAvatarModule } from '@frame-ui-ng/components/avatar';

HTML

<span frAvatar size="md">
  <img frAvatarImage src="data:image/svg+xml;utf8,..." alt="Sarah Chen" />
  <span frAvatarFallback>SC</span>
</span>

03 Examples

Basic

Use an image with a fallback so the avatar still renders meaningful identity when the image is missing or fails.

Component Sheet

Grid: 8px · Scale: 1:1

Sarah Chen SC

Fallbacks

Fallback initials and icon-only avatars cover broken images, generic accounts, and not-yet-uploaded profiles.

Component Sheet

Grid: 8px · Scale: 1:1

Jordan Reed JR @

Sizes

Choose from `xs`, `sm`, `md`, and `lg` to match dense lists, cards, or larger profile surfaces.

Component Sheet

Grid: 8px · Scale: 1:1

Sarah Chen SC Maya Torres MT Jordan Reed JR Nina Shah NS

Badges

Badges work well for unread counts, online markers, or lightweight secondary status attached to a person.

Component Sheet

Grid: 8px · Scale: 1:1

Maya Torres MT 9

Groups

Group avatars when several people share ownership of a task, thread, or document, and expand them on hover when overlap should relax.

Component Sheet

Grid: 8px · Scale: 1:1

Sarah Chen SC Maya Torres MT Jordan Reed JR +3

04 Custom Styling

Override avatar tokens on a local wrapper when a specific product area needs different radii, badge treatments, or grouping density while keeping the same markup and behaviors.

Component Sheet

Grid: 8px · Scale: 1:1

Nina Shah NS 2
Sarah Chen SC Jordan Reed JR +1

05 Token Inspector

Hover the avatar shell, image, fallback, badge, or group count to inspect the tokens that control sizing, surfaces, overlays, and overlap behavior. Click a region to pin the inspector while you review the current values.

Sarah Chen SC 4 Jordan Reed JR
Maya Torres MT Nina Shah NS +2

06 Design Tokens

Use these CSS custom properties to tune avatar sizing, fallback spacing, badge styling, and group overlap without changing the component markup.

SCSS


  --frame-avatar-root-size: 2.5rem;
  --frame-avatar-root-radius: var(--frame-radius-full);
  --frame-avatar-root-bg: var(--frame-muted);
  --frame-avatar-root-border: transparent;
  --frame-avatar-root-color: var(--frame-muted-foreground);
  --frame-avatar-root-font-size: 0.875rem;
  --frame-avatar-root-font-weight: 600;
  --frame-avatar-root-shadow: none;
  --frame-avatar-size-xs: 1.5rem;
  --frame-avatar-size-sm: 2rem;
  --frame-avatar-size-md: 2.5rem;
  --frame-avatar-size-lg: 3.5rem;
  --frame-avatar-font-size-xs: 0.5rem;
  --frame-avatar-font-size-sm: 0.75rem;
  --frame-avatar-font-size-md: 0.875rem;
  --frame-avatar-font-size-lg: 1rem;
  --frame-avatar-image-fit: cover;
  --frame-avatar-fallback-padding: 0.25rem;
  --frame-avatar-icon-size: 1rem;
  --frame-avatar-badge-size: 0.875rem;
  --frame-avatar-badge-radius: var(--frame-radius-full);
  --frame-avatar-badge-bg: var(--frame-primary);
  --frame-avatar-badge-border: var(--frame-surface);
  --frame-avatar-badge-color: var(--frame-primary-foreground);
  --frame-avatar-badge-font-size: 0.625rem;
  --frame-avatar-badge-font-weight: 700;
  --frame-avatar-group-overlap: 0.625rem;
  --frame-avatar-group-transition-duration: 180ms;
  --frame-avatar-group-transition-timing: ease;
  --frame-avatar-group-count-bg: var(--frame-surface);
  --frame-avatar-group-count-border: var(--frame-border);
  --frame-avatar-group-count-color: var(--frame-muted-foreground);