Testimonials

Testimonial section patterns for landing pages and marketing sites. Quote cards, avatar grids, and carousel layouts.

Overview

Testimonials are essential for building credibility on marketing pages. These patterns use semantic <blockquote> and <cite> elements for proper quote attribution, combined with data-layout="grid" for responsive card layouts.

Key features:

  • Semantic HTML with blockquote and cite
  • Responsive grid layouts with data-layout="grid"
  • Avatar integration with user-avatar
  • Star ratings with icon-wc
  • carousel-wc component for featured testimonials
  • Accessible by default

Simple Quotes

The most straightforward testimonial pattern: quote cards with author attribution. Uses data-layout="grid" for a responsive layout that automatically adjusts columns based on available space.

With Avatars and Ratings

Enhanced testimonials featuring author avatars and star ratings. The user-avatar component displays profile images, while icon-wc renders star ratings.

Star Rating CSS

Add this style for the star rating color:

The avatar variant uses smaller text (font-size-md instead of lg), drops font-style: italic on quotes, and removes the border-top from footer. Override the base styles with:

Carousel

A carousel of featured testimonials using the carousel-wc component. Larger cards with more prominent quotes, real prev/next buttons, clickable dot indicators, keyboard navigation, and full ARIA semantics.

Carousel CSS

Add these styles for carousel testimonial card styles:

Base Testimonial Styles

Common styles shared across all testimonial variants:

Layout Configuration

Common data attributes for testimonial sections:

Element Attribute Values Description
data-layout="grid" data-layout-min CSS length (e.g., 300px) Minimum card width before wrapping.
data-layout="stack" data-layout-gap xs s m l xl 2xl Vertical spacing between elements.
data-layout="cluster" data-layout-gap xs s m l Gap between avatar and cite.
data-layout="cluster" data-layout-align flex-start center flex-end Vertical alignment of items.
carousel-wc data-item-width full auto CSS length Width of each carousel slide.
carousel-wc data-gap xs s m l xl Gap between carousel slides.
user-avatar data-size sm md lg xl Avatar size.

Usage Notes

  • Semantic markup: Always use <blockquote> for testimonial quotes and <cite> for author attribution. This provides proper semantics for assistive technologies.
  • Avatar alt text: Avatar images should have empty alt="" since the author name is provided in text. The image is decorative.
  • Quote marks: Include quotation marks in the text content rather than using CSS ::before pseudo-elements. This ensures quotes are read by screen readers.
  • Star ratings: Consider adding a text alternative for ratings (e.g., "5 out of 5 stars") in a visually hidden span for accessibility.
  • Carousel UX: The carousel-wc component provides keyboard navigation (arrow keys, Home/End), prev/next buttons, clickable dot indicators, and full ARIA semantics. It also respects prefers-reduced-motion.
  • Performance: Use loading="lazy" on avatar images that are below the fold. For above-the-fold testimonials, use loading="eager".
  • Authenticity: Real testimonials with full names, titles, and company names are more credible. Consider linking to the author's profile or the company website.

Related

Layout Grid

Grid layout element documentation

User Avatar

Avatar component documentation

Icon Component

Icon element documentation

Carousel

Scroll carousel component documentation

Call to Action

CTA section patterns