Skip to content

Testimonial One

The Testimonial One block is a carousel-based testimonial section that cycles through customer or user quotes. Each slide renders a rich text body with decorative quote icons, the reviewer’s name, job title, company, and an avatar image — all inside a card layout that supports drag and swipe gestures. On mobile a single slide is shown; on larger screens two slides appear side-by-side with arrow navigation.

Testimonial Block Heading

TestimonialOne is assembled from the following components:

ComponentRole
CarouselProvides the slide container, dots, arrows, and drag/swipe logic
RichTextRenders each testimonial body as structured rich text
ContentImageRenders the reviewer avatar with responsive <picture> support
ButtonUsed internally for the custom previous/next arrow controls

Shared internals (testimonial-internals) provide the TestimonialProperties type, image profile, and CMS mapper utilities used by all testimonial variants.

Below is an example of how to use TestimonialOne in your site.

import { TestimonialOne } from "@/rokkit200-ui/blocks/testimonial/variants/testimonial-one/testimonial-one";
import { mapCmsType } from "@/rokkit200-ui/lib/content-mapper/content-mapper-util";
import { testimonialCmsMappers } from "@/rokkit200-ui/blocks/testimonial/internals/lib/testimonial-utils";
const properties = mapCmsType(testimonialCmsMappers, testimonialResponse);
return <TestimonialOne {...properties!} />;

All visual customisation is done via className props. No additional CSS or theme tokens are required — pass Tailwind classes to adjust layout, spacing, typography, and avatar styling.

Reduce padding, gaps, font sizes, and avatar dimensions for a tighter, space-efficient presentation.

Testimonial Block Heading

Replace the default rounded card with a flat, top-bordered style for a sharper editorial look.

Testimonial Block Heading

Extends TestimonialProperties (from testimonial-internals).

PropTypeDefaultDescription
headingstringVisually hidden heading for the testimonial section. Required.
testimonialsTestimonialSlide[]Array of testimonial slide objects to render in the carousel.
classNamestringClasses applied to the root <section> element.
slideClassNamestringClasses applied to each slide <article> card.
headingClassNamestringClasses applied to the visually hidden <h2> heading.
richTextClassNamestringClasses applied to the RichText component in each slide.
nameClassNamestringClasses applied to the reviewer name <h3>.
jobCompanyClassNamestringClasses applied to the job title and company <p>.
companyClassNamestringClasses applied to the company name (reserved for future use).
mediaClassNamestringClasses applied to the ContentImage avatar element.

Each item in the testimonials array has the following shape:

PropTypeDescription
datestringDate of the testimonial.
mainBodyRichTextNode[]Structured rich text nodes for the testimonial body.
companystringReviewer’s company name (optional).
media{ imageSource, profile }Avatar image source and responsive picture profile.
jobTitlestringReviewer’s job title.
namestringReviewer’s name.
  • The root element is a <section> with aria-labelledby pointing to a visually hidden heading, providing a labelled landmark for assistive technology.
  • The heading renders as an <h2> with sr-only styling. Ensure the heading text is descriptive (e.g. “Customer Testimonials”) so screen reader users understand the section purpose.
  • Each slide is an <article> with aria-label set to “Testimonial from x”, giving each testimonial an accessible label.
  • Navigation arrows are <button> elements with aria-label (“Previous slide” / “Next slide”) and are properly disabled when at the boundary of navigation.
  • The carousel supports keyboard navigation and touch/drag gestures with watchDrag enabled.
  • Reviewer avatar images are marked as decorative (empty alt text) since the reviewer’s name is already present as text, avoiding redundant announcements.
  • The carousel includes dot indicators for visual orientation. Ensure sufficient colour contrast between dots and the background.