File: src/blocks/testimonials/Testimonials02.astro
Carousel / slider of testimonials with configurable slides-per-view and arrow placement.
Config (blocks.ts → testimonialsSlider)
testimonialsSlider: {
heading: "What clients say",
subheading: "Swipe through more feedback from recent projects.",
slidesPerView: 1,
slidesPerViewMd: 2,
slidesPerViewLg: 3,
arrowPosition: "header", // "sides" | "header"
gap: 24,
items: [
{
quote: "Delivered ahead of schedule…",
name: "Sarah Chen",
role: "Founder, Northline Studio",
initials: "SC",
image: "/images/testimonials/sarah.svg",
imageAlt: "Sarah Chen",
},
],
},
Add to a page
---
import Testimonials02 from "@/blocks/testimonials/Testimonials02.astro";
---
<Testimonials02 />
Inline:
<Testimonials02
arrowPosition="sides"
slidesPerViewLg={2}
sectionId="home-testimonials"
/>
Props
| Prop | Config key | Notes |
|---|---|---|
sectionId |
— | Default "testimonials-slider" |
heading |
testimonialsSlider.heading |
|
subheading |
testimonialsSlider.subheading |
|
items |
testimonialsSlider.items |
Same shape as Testimonials01 |
slidesPerView |
testimonialsSlider.slidesPerView |
Mobile |
slidesPerViewMd |
testimonialsSlider.slidesPerViewMd |
Tablet |
slidesPerViewLg |
testimonialsSlider.slidesPerViewLg |
Desktop |
arrowPosition |
testimonialsSlider.arrowPosition |
"header" | "sides" |
gap |
testimonialsSlider.gap |
Gap in px |
Also include: TestimonialCard.astro, TestimonialSliderArrows.astro.
Returns null if items is empty.