Skip to content

Video Testimonial Cards with Photo Thumbnails

Dark Tailwind CSS testimonial section with photo thumbnail cards and play buttons that open each customer video in an accessible dialog player.

Also known as: video testimonial section, customer video reviews, video testimonial cards, testimonial video popup, customer stories section

Tailwind CSS Testimonials Responsive Dark #card #dark #modal #testimonials #video

Video Testimonial Cards with Photo Thumbnails live demo

Open in new tab

Tailwind CSS code (HTML, CSS, JS)

A dark testimonial section built with Tailwind CSS where each customer card shows a photo thumbnail with a play button, a duration badge, a short quote and a result tag. Clicking a thumbnail opens the customer's video in a shared, accessible player built on the native dialog element. It fits SaaS landing pages, case-study pages and product launches that rely on social proof.

How it works

The root is section.vtc-testimonials. The header combines the heading with an aggregate rating, and the ul grid switches to three columns at md. Every card is an li with a button.vtc-play on top: it contains the photo (.vtc-thumb), a gradient overlay, the amber play icon (.vtc-icon) and the duration. The button carries data-vtc-play, the video address in data-vtc-src and the player heading in data-vtc-title. Below it a figure holds the blockquote, the name, the role and a small metric pill.

One dialog.vtc-dialog (data-vtc-dialog) sits at the end of the section. On DOMContentLoaded the script initializes each .vtc-testimonials. A click on a thumbnail copies its title into data-vtc-dialog-title, uses the card photo as the video poster, sets the src of data-vtc-video, calls showModal() and starts playback. The dialog's close event, fired by Escape, the close button or a backdrop click, pauses the video, removes its source so it stops downloading and returns focus to the thumbnail that opened it.

style.css adds the photo zoom and play icon glow on hover and focus, the blurred ::backdrop and the vtc-zoom entrance.

Customization

  • data-vtc-src on each .vtc-play: point to your own MP4 or WebM file. The sample clip is a CC0 test video from MDN.
  • data-vtc-title: the text shown above the player.
  • aspect-4/3 on .vtc-play: use aspect-square or aspect-4/5 for taller portrait thumbnails.
  • bg-amber-400 on .vtc-icon and #fbbf24 in style.css: change the accent color of the play button and focus ring.
  • w-[min(56rem,calc(100%-2rem))] on .vtc-dialog: make the player larger or smaller.
  • md:grid-cols-3 on the list: switch to lg:grid-cols-4 for four stories.
  • Remove the video.play() call in script.js to wait for the user to press play.

The portraits come from Unsplash; replace them with photos or video stills of your real customers.

Use cases

  • SaaS landing pages: customer photos with play buttons open each video in a modal player
  • Case-study pages: cards show a short quote, role and a result tag
  • Product launches: add social proof with an aggregate rating beside the heading
  • Agency sites: a duration badge on each thumbnail sets viewer expectations
  • Dark-themed sites: a native dialog player closes with Escape and returns focus to the card

Accessibility

Each thumbnail is a real button whose visually hidden label names the person and the video length, so the decorative photo uses an empty alt. The player is a modal dialog labelled by #vtc-dialog-title; the browser keeps focus inside it and Escape closes it. Focus moves to the close button on open and back to the thumbnail on close. The video has native controls. Add a track element with captions to your real videos. Autoplay and all animations are skipped under prefers-reduced-motion, and amber on near-black keeps the focus ring clearly visible.

Usage notes

The script exits early in browsers without HTMLDialogElement.showModal(). For several sections on one page, change the id values.

Video Testimonial Cards with Photo Thumbnails at a glance

Framework
Tailwind CSS
Code
HTML, CSS, JavaScript
JavaScript
Vanilla JavaScript, no jQuery
Dependencies
Tailwind CSS
Layout
Responsive, works on mobile, dark design
Category
Testimonials
License
Free for personal and commercial use

Questions about this template

Can I use the Video Testimonial Cards with Photo Thumbnails code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

Load Tailwind CSS from a CDN (the links are under Requirements). Paste the HTML where the component should appear, add the CSS to your stylesheet and load the JavaScript before the closing </body> tag. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. The script is plain vanilla JavaScript, so it works without jQuery, React or Vue. You can still use the markup inside those frameworks.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

Add these to your page (already included in the download):

  • <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>

The Tailwind browser build is for prototyping. In production, compile Tailwind with its CLI or your bundler.

Video Testimonial Cards with Photo Thumbnails – Tailwind CSS testimonials component screenshot
Video Testimonial Cards with Photo Thumbnails · Tailwind CSS Testimonials

More Testimonials

Testimonial with Large Portrait Photo – Tailwind CSS testimonials preview

Testimonial with Large Portrait Photo

Featured Tailwind CSS testimonial with a large customer portrait, offset frame, serif quote, star rating and result metrics.

Single Testimonial with Large Quote – WordPress testimonials preview

Single Testimonial with Large Quote

A single testimonial for the block editor with a large centered customer quote, round portrait, name, role and company wordmark on a deep navy background.

Testimonial Cards with Avatars – WordPress testimonials preview

Testimonial Cards with Avatars

Testimonial cards for the block editor: three customer reviews with five-star ratings, round portrait avatars, names and roles on a warm light background.

Customer Testimonials Section for Shopify – Shopify testimonials preview

Customer Testimonials Section for Shopify

A Shopify section for customer quotes with star ratings, avatars and linked products, shown as a grid or a scrolling row with previous and next buttons.

Scroll-Snap Testimonial Slider – Pure CSS testimonials preview

Scroll-Snap Testimonial Slider

Horizontally scrolling testimonial cards using CSS scroll snap, with star ratings, avatars and accessible previous and next buttons.

Testimonial Carousel – Bootstrap 5 testimonials preview

Testimonial Carousel

Bootstrap 5 testimonial carousel with serif quote cards, pill indicators, arrow buttons and an accessible pause control.