{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "author-card",
  "title": "Author Card",
  "description": "An article author profile with optional avatar, role, biography, and profile link.",
  "registryDependencies": [],
  "files": [
    {
      "path": "payload-components/source/components/AuthorCard/Component.tsx",
      "content": "import React, { type ReactNode } from 'react'\n\nexport type AuthorCardProps = {\n  name: string\n  role?: string | null\n  bio?: string | null\n  /** Pass your populated Payload Media or Next Image element. */\n  avatar?: ReactNode\n  href?: string | null\n  label?: string\n  id?: string\n  className?: string\n  disableInnerContainer?: boolean\n}\n\nconst profileHref = (value: string | null | undefined) => {\n  if (!value) return undefined\n  const href = value.trim()\n  if (/^\\/(?![\\/\\\\])/.test(href) && !href.includes('\\\\') && !/[\\u0000-\\u0020]/.test(href))\n    return href\n  try {\n    const url = new URL(href)\n    return ['https:', 'http:'].includes(url.protocol) && !url.username && !url.password\n      ? url.href\n      : undefined\n  } catch {\n    return undefined\n  }\n}\n\n/** Presentational author profile; your template owns author data and access rules. */\nexport function AuthorCard({\n  name,\n  role,\n  bio,\n  avatar,\n  href,\n  label = 'About the author',\n  id,\n  className,\n  disableInnerContainer = false,\n}: AuthorCardProps) {\n  const safeHref = profileHref(href)\n  const initials = name\n    .trim()\n    .split(/\\s+/)\n    .slice(0, 2)\n    .map((part) => Array.from(part)[0] ?? '')\n    .join('')\n    .toUpperCase()\n\n  return (\n    <aside\n      id={id}\n      aria-label={label}\n      className={['bg-background py-8 text-foreground', className].filter(Boolean).join(' ')}\n    >\n      <div className={disableInnerContainer ? undefined : 'container mx-auto px-6'}>\n        <div className=\"mx-auto max-w-3xl border-y border-border py-8\">\n          <p className=\"mb-6 text-xs font-medium uppercase tracking-eyebrow text-muted-foreground\">\n            {label}\n          </p>\n          <div className=\"flex flex-col gap-6 sm:flex-row sm:items-start\">\n            <div className=\"flex size-20 shrink-0 items-center justify-center overflow-hidden rounded-full bg-muted font-serif text-2xl text-muted-foreground [&_img]:h-full [&_img]:w-full [&_img]:object-cover\">\n              {avatar ?? <span aria-hidden=\"true\">{initials}</span>}\n            </div>\n            <div className=\"min-w-0 flex-1\">\n              <p className=\"break-words text-xl font-medium tracking-title\">\n                {safeHref ? (\n                  <a\n                    className=\"rounded-sm underline decoration-border underline-offset-4 transition-colors hover:text-brand focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n                    href={safeHref}\n                  >\n                    {name}\n                  </a>\n                ) : (\n                  name\n                )}\n              </p>\n              {role ? <p className=\"mt-1 text-sm text-muted-foreground\">{role}</p> : null}\n              {bio ? (\n                <p className=\"mt-4 max-w-xl text-base leading-7 text-muted-foreground\">{bio}</p>\n              ) : null}\n            </div>\n          </div>\n        </div>\n      </div>\n    </aside>\n  )\n}\n",
      "type": "registry:file",
      "target": "~/src/components/AuthorCard/Component.tsx"
    }
  ],
  "meta": {
    "payloadComponent": {
      "installCommand": "payload-components add author-card",
      "postInstall": [],
      "requiresPayloadComponentWrapper": false,
      "supportedTargets": [
        "payload-website-starter",
        "payload-blocks-app"
      ]
    }
  },
  "docs": "File-only article template component. Import AuthorCard from @/components/AuthorCard/Component and pass the content explicitly. No Pages or RenderBlocks edits and no generators. Direct install: pnpm dlx shadcn@latest add https://www.payload-components.xyz/r/author-card.json Optional tracked install in a supported Payload project: payload-components add author-card.",
  "type": "registry:component"
}