Testimonials block renders a responsive grid of quote cards sourced from Sanity testimonial documents. It supports five display modes including grouping testimonials by project for impact case studies.
Props
Optional section heading rendered as
<h2>.Controls which testimonials are shown. Defaults to
all. Filtering is applied by resolveBlockTestimonials() in sanity.ts before the block receives its props.| Value | Behavior |
|---|---|
all | All testimonials |
industry | Only type == "industry" |
student | Only type == "student" |
byProject | Only testimonials with a project reference; grouped by project |
manual | Editor-selected list from the block config |
Pre-resolved array of testimonial objects injected by
BlockRenderer via resolveBlockTestimonials(). Each testimonial includes name, quote, role, organization, type, photo, videoUrl, and an optional project reference.Additional CSS classes.
HTML
id for anchor targeting.Usage in Sanity Studio
- Add a Testimonials block to a page.
- Set an optional Heading.
- Choose a Display Mode:
all— shows every testimonialindustry/student— filters by typebyProject— groups quotes under their linked project (useful for impact sections)manual— exposes a multi-reference picker to hand-select testimonials
Layout
Testimonials render in a 3-column responsive grid (md:grid-cols-2 lg:grid-cols-3). In byProject mode, each group has a linked project heading above its 3-column grid.
Each card is rendered by TestimonialCard.astro which handles the quote, attribution, photo, and optional video link.