Components / PaperAvatar

Primitives

PaperAvatar

Square avatar primitive with initials fallback and stack support.

← square avatars keep the system sharp.

Preview

KA
AN
RV
TM
import * as React from 'react'
import { cva, type VariantProps } from 'class-variance-authority'
import { cn } from '@/lib/utils'

const avatarVariants = cva('inline-flex items-center justify-center overflow-hidden border-2 border-ink-black bg-paper-aged font-display italic text-ink-black rounded-none', {
  variants: {

Installation

Copy this file into your project, export its barrel, and then add it to the master UI index.

  1. Step 1.Create this file:
    components/ui/paperAvatar/paperAvatar.tsx
  2. Step 2.Create the barrel:
    components/ui/paperAvatar/index.ts
  3. Step 3.Add this export in components/ui/index.ts:
    export * from './paperAvatar'

Variants

Small

SM

Medium

MD

Large

LG

XL

XL

Props

PropTypeDefaultDescription
size'sm' | 'md' | 'lg' | 'xl'mdAvatar dimensions and type scale.
srcstringundefinedImage source URL.
initialsstringPFFallback label when image is missing.

Examples

Team row

Use stacked avatars for compact participant lists.

KA
AS
NV
<PaperAvatarGroup>...</PaperAvatarGroup>

Profile header

XL avatar anchors account settings sections.

PF
<PaperAvatar size="xl" initials="PF" />