Skip to content

Testimonial masonry

Testimonial masonry · sample rowOpen ↗

Renders TestimonialMasonry from @bison-lab/ui. An avatar is optional; initials from the author’s name stand in when it is empty. Once there are at least minItemsForFade quotes the grid clips at maxVisibleRows and the link shows under the fade. In the admin the quotes are edited with the kit items list (ITEMS_FIELD): each closed row reads as the author’s name with their avatar, or their initials while it is empty, and the opening of the quote. The last quote cannot be deleted.

payload.config.ts / collections
import { TestimonialMasonryBlock } from "@bison-lab/payload-blocks";
// In the collection's `blocks` array:
TestimonialMasonryBlock
blocks/registry.ts
import { TestimonialMasonryBlockRenderer } from "@bison-lab/payload-blocks/react";
// In the site's registry:
testimonialMasonry: TestimonialMasonryBlockRenderer,
FieldTypeNotes
eyebrowtextSmall label above the heading. Leave empty to hide the row.
title *text
descriptiontextarea
items *arrayAt least 1 row. Opens with 1 empty row; the admin field will not remove below that.
items[].content *textareaLabelled “Quote”.
items[].authorgroup
items[].author.name *text
items[].author.titletextRole or organisation, e.g. "Head of design".
items[].author.avataruploadOptional. Initials from the name are used when empty. From the media collection.
linkgroupLabelled “Link”. Shown under the fade, once there are enough quotes to clip.
link.typeradioLabelled “Link”. One of page, external. Default "page".
link.pagerelationshipRelationship to pages.
link.hreftextLabelled “URL”. A full URL ("https://example.com"), "mailto:" or "tel:", or a site path ("/contact").
link.labeltextLabelled “Label”.
link.newTabcheckboxLabelled “Open in a new tab”. Default false.
minItemsForFadenumberHow many quotes before the grid clips and the bottom fade appears. At least 1. Default 7.
maxVisibleRowsnumberRows shown before the fade. Optional. At least 1.
settingsgroupLabelled “Block Settings”.
settings.backgroundselectLabelled “Background”. The surface this section sits on. Page is the plain page background. One of page, card, muted, color, gradient. Default "page".
settings.backgroundColortextLabelled “Color”.
settings.backgroundColorDarktextLabelled “Dark mode color”.
settings.gradientTotextLabelled “Gradient end”.
settings.gradientToDarktextLabelled “Dark mode gradient end”.
settings.gradientDirectiontextLabelled “Gradient direction”.
settings.spacingselectLabelled “Spacing”. The air above and below this section. Default is the block's own padding; Compact and Spacious replace it. This is the band, not the site-wide spacing in Theme → Appearance. One of compact, default, spacious. Default "default".
settings.anchortextLabelled “Anchor”. In-page links can target this section. Leave blank for none.
settings.hiddencheckboxLabelled “Hidden”. The section stays in the editor and is left off the page. Default false.

* required.