Person Avatar

Circular avatar for people. Renders a photo when available; otherwise shows the first initial on a dark surface. Used in testimonial cards.

With photo

Gabriel Hidalgo

Initial fallback (no image)

A
M
P

Sizes

S
32px
M
48px (default)
L
64px

Props

PropTypeDefaultDescription
name*string-Used as alt text and as the source for the fallback initial letter.
imageSanityImage | LocalImage-Image object from Sanity or the local-image shape used for seeded content.
localImagePathstring-Direct path to a public image. Takes precedence over `image` when provided.
sanityWidthnumber96Requested width (px) for the Sanity image URL builder. Height matches width.
classNamestring-Additional classes merged onto the outer circle. Override size with h-* / w-*.

Import

tsx
import { PersonAvatar } from '@/components/ui/PersonAvatar'

Usage

tsx
<PersonAvatar
  name={testimonial.name}
  image={testimonial.image}
  localImagePath={testimonial.localImagePath}
/>