Skip to main content
Our new developer certification is live!

AuthorCard

Displays a single person card with avatar image, name, and optional link.

Props

PropTypeRequiredDefaultDescription
authorPersonYes-Person object from Contentstack containing title, url, and metadata
cslpCSLPFieldMappingNo-CSLP mapping for editable fields (Contentstack Live Preview)
labelstringNo'Author'Label text to display above person name (e.g., "Author", "Participant")

Usage

import AuthorCard from '@/components/molecules/AuthorCard';

<AuthorCard 
  author={{
    title: "John Doe",
    url: "/person/john-doe",
    metadata: {
      image: {
        url: "/images/person.jpg",
        title: "John Doe"
      }
    }
  }}
/>

Features

  • Displays person avatar (40x40px, rounded)
  • Customizable label (defaults to "Author", can be set to "Participant" for live streams)
  • Links to person page if URL is provided
  • Supports CSLP for live preview editing

Custom Labels

The label prop allows you to customize the text displayed above the author's name:

// Default: "Author"
<AuthorCard author={author} />

// Custom: "Participant"
<AuthorCard author={author} label="Participant" />

Notes

  • Returns null if no person image is provided
  • Avatar is displayed as a circular image
  • Label uses cs-xs-body and person name uses cs-h6 typography variants