Team Bios
A bio-forward team section pairing avatar, role, and a short biography in two-up member cards.
v0.2.0Page blockpayload-website-starter
import type { Block } from 'payload'
import { teamFields, teamMemberFields } from '@/blocks/shared/teamFields'
export const TeamBios: Block = {
slug: 'teamBios',
// Existing apps must migrate stored data before adopting this identifier:
// https://www.payload-components.xyz/docs/registry#installed-source-and-migrationsimport type { Block } from 'payload'import { teamFields, teamMemberFields } from '@/blocks/shared/teamFields'export const TeamBios: Block = { slug: 'teamBios', // Existing apps must migrate stored data before adopting this identifier: // https://www.payload-components.xyz/docs/registry#installed-source-and-migrations dbName: 'pc_tea_bio', interfaceName: 'TeamBiosBlock', admin: { group: 'Team', }, fields: [ // Shared team core (eyebrow, title). Variant-specific fields follow; edit the // shared shape in @/blocks/shared/teamFields. ...teamFields, { name: 'description', type: 'textarea', custom: { payloadComponents: { localization: 'localized' } }, }, { name: 'members', type: 'array', required: true, minRows: 1, maxRows: 8, admin: { initCollapsed: true, }, // Shared member shape plus the bio this variant renders — see // @/blocks/shared/teamFields. Appending here keeps `bio` off the compact // team-grid and team-roster schemas, which have no room to show it. fields: [ ...teamMemberFields, { name: 'bio', type: 'textarea', custom: { payloadComponents: { localization: 'localized' } }, required: true, }, ], }, ], labels: { plural: 'Team Bios Blocks', singular: 'Team Bios', },}import React from 'react'import type { TeamBiosBlock as TeamBiosBlockData } from '@/payload-types'import { Media } from '@/components/Media'import { Badge } from '@/components/ui/badge'import { cn } from '@/utilities/ui'type Props = TeamBiosBlockData & { id?: string className?: string disableInnerContainer?: boolean}export const TeamBiosBlock: React.FC<Props> = ({ className, description, disableInnerContainer, eyebrow, id, members, title,}) => { return ( <section className={cn('container', className)} id={id ? `block-${id}` : undefined}> <div className="overflow-hidden rounded-frame border border-border/70 bg-card/35 px-6 py-10 sm:px-8 lg:px-12 lg:py-14"> <div className={cn('flex flex-col gap-12', { 'mx-auto max-w-5xl': !disableInnerContainer, })} > <div className="flex max-w-2xl flex-col gap-4"> {eyebrow ? ( <Badge variant="outline" className="w-fit rounded-full px-3 py-1 uppercase tracking-eyebrow" > {eyebrow} </Badge> ) : null} <h2 className="text-3xl font-medium tracking-title text-balance sm:text-4xl"> {title} </h2> {description ? ( <p className="text-base leading-7 text-muted-foreground">{description}</p> ) : null} </div> {members && members.length > 0 ? ( <div className="grid gap-x-8 gap-y-10 sm:grid-cols-2"> {members.map((member, index) => ( <article className="flex flex-col gap-4 rounded-panel border border-border/70 bg-background/70 p-6" key={member.id ?? index} > <div className="flex items-center gap-4"> <div className="size-14 shrink-0 overflow-hidden rounded-full border border-border/70 bg-card p-0.5"> <Media resource={member.avatar} imgClassName="h-full w-full rounded-full object-cover object-top" /> </div> <div className="flex min-w-0 flex-col"> <h3 className="truncate text-base font-medium text-foreground"> {member.name} </h3> <span className="truncate text-sm text-muted-foreground">{member.role}</span> </div> </div> <p className="text-sm leading-6 text-muted-foreground">{member.bio}</p> {member.href ? ( <a className="mt-auto w-fit text-sm font-medium text-foreground underline-offset-4 hover:underline" href={member.href} > Read more </a> ) : null} </article> ))} </div> ) : null} </div> </div> </section> )}import type { Field } from 'payload'/** * Shared field core for the Team component family. * * Every team variant (team-roster, team-grid, …) spreads `teamFields` first for * the shared heading, then appends its own variant-specific shape — the grouped * department roster or the flat member grid that differs per layout. Editing the * shared eyebrow/title shape here updates every installed team block at once, so * the family never drifts field-by-field across a repo. * * `teamMemberFields` is the one-person shape (avatar upload, name, role, optional * link) reused by both variants — team-roster nests it inside each group, while * team-grid uses it for a single flat `members` array — so a member looks the * same everywhere it appears. Each avatar is an editable Media upload, so editors * manage the team from the admin instead of shipping hardcoded image URLs. * * Installed once per repo at `src/blocks/shared/teamFields.ts`; re-running * `payload-components add team-*` never overwrites a copy you have already edited. */export const teamFields: Field[] = [ { name: 'eyebrow', type: 'text', custom: { payloadComponents: { localization: 'localized' } }, }, { name: 'title', type: 'text', custom: { payloadComponents: { localization: 'localized' } }, required: true, },]export const teamMemberFields: Field[] = [ { name: 'avatar', type: 'upload', relationTo: 'media', required: true, }, { name: 'name', type: 'text', custom: { payloadComponents: { localization: 'global' } }, required: true, }, { name: 'role', type: 'text', custom: { payloadComponents: { localization: 'localized' } }, required: true, }, { name: 'href', type: 'text', custom: { payloadComponents: { localization: 'global' } }, },]Installation
npx payload-components add team-biosnpx shadcn@latest add https://www.payload-components.xyz/r/team-bios.jsonThe registry copy brings the source files only; register the block and map its renderer yourself, or let the CLI command above do both.
Usage
Editors add Team Bios from a Page layout's block picker. This is the form they fill.
Team Bios
Block- Eyebrow
- Leadership
- Title
- The people accountable for the platform.
- Description
A small team with long tenure in analytics infrastructure — the same people you will talk to after you sign.
- Members
- 01Maya ChenChief Executive Officer
- 02Daniel OkaforChief Technology Officer
- 03Priya RamanVP Customer Engineering
- 04Tom VasquezHead of Design
- 01
- 1Add the block to a Page from the layout block picker.
- 2Fill the fields as above.
- 3Publish. RenderBlocks renders the block, fully typed.
Content model
eyebrow and title come from the shared team base at src/blocks/shared/teamFields.ts, and each
member reuses the shared teamMemberFields shape so a person looks the same across every team
variant. This block appends a required bio to that shape — the compact team-grid and
team-roster layouts have no room to render one, so it stays off their schemas.
Prop
Type
Each item in members carries:
Prop
Type
What it installs
Composition
How the block hangs together in Payload
Pageslayout[]TeamBioseyebrowtitledescriptionmembers[]namerolebiohref
- Fields
src/blocks/TeamBios/config.ts- Render
src/blocks/TeamBios/Component.tsx
Files
Copies 3 files into your project. Files tagged shared are reused across the family.
Edits
Wires TeamBios into the project in 4 places.
| Registers the block | src/collections/Pages/index.ts |
| Maps the renderer | src/blocks/RenderBlocks.tsx |
| Regenerates types | src/payload-types.ts |
| Regenerates the admin import map | src/app/(payload)/admin/importMap.js |
- Registers the block
src/collections/Pages/index.ts - Maps the renderer
src/blocks/RenderBlocks.tsx - Regenerates types
src/payload-types.ts - Regenerates the admin import map
src/app/(payload)/admin/importMap.js
teamFields.ts is shared source for this component family. Components that install the same path reuse your local copy, and re-running an install never overwrites a copy you have changed.Re-running the install detects existing source and wiring, then records install state in .payload-components/state.json.
Requirements
- Target
- payload-website-starter, payload-blocks-app
- Payload
- v3 (3.25 or newer) / v4 (experimental)
- Next.js
- 15 / 16 with v316 (16.4 or newer) with v4
- shadcn UI
badge
Payload v4 support is experimental: it needs Next.js 16 (16.4 or newer) and Node.js 24.22.1 or newer. Payload v3 (3.25 or newer) stays fully supported.
Your project must already expose components.json, src/payload.config.ts, the surfaces patched by payload-components add. The CLI verifies this against the support matrix before touching anything.