🚀 Ship faster with premium components 🚀
Search documentation v1.1.0

Testimonials

Showcase positive feedback from users in a carousel

Source Report Issue
Command docs
How to add this block to your project
npm run add Testimonials

Use the Testimonials component to display multiple customer or user feedbacks within a carousel:

Preview
Unlock code
How to use the Testimonials component in Astro
---
const testimonials = [{
text: '"Add user testimonies to improve trustworthiness"',
name: 'Nicole Williams',
role: 'Developer',
avatar: {
img: '/img/nicole.png',
alt: 'Nicole'
}
}, { ... }, { ... }, { ... }]
---
<Testimonials testimonials={testimonials} />

The Testimonials component is built on top of Testimonial, meaning you can use the same props in an array of objects to create a carousel of testimonials.

Titles

You can specify additional titles for the component using the title and subTitle props:

Testimonials

What are users have to say
Unlock code
How to use titles with the component
<Testimonials
testimonials={testimonials}
title="Testimonials"
subTitle="What are users have to say"
showIcon={true}
/>

Note that when showIcon is set to true, the showIcon prop on individual testimonial slides will be ignored.

Multiple Testimonials per Slide

This component uses the Carousel component, meaning you can also use carousel-specific props to further customize your testimonials. For example, you can use the following setup to display multiple testimonials per slide:

Unlock code
How to customize the carousel
<Testimonials
testimonials={[]}
itemsPerSlide={2}
pagination={{ type: 'dots' }}
/>

You can read more about how to customize the pagination on the Pagination component documentation.

API

Unlock code
Component API reference
type TestimonialsProps = {
testimonials: TestimonialProps[]
title?: string
subTitle?: string
showIcon?: boolean
className?: string
} & Omit<CarouselProps, 'items'>
Please see the documentation of the Testimonial component for TestimonialProps, and refer to the Carousel documentation for CarouselProps.
PropPurpose
testimonials Sets a list of testimonials for the carousel.
title Sets a title for the testimonials.
subTitle Sets a subtitle under the title.
showIcon Shows a quote icon above the testimonials.
className Pass additional CSS classes for the component.