Testimonial

An animated testimonial carousel with cinematic quote transitions, stacked avatar navigation, autoplay, and keyboard controls.

The amount of work he has put in is immense. He is simply the best developer I have ever seen.

Gojo Satoru · The Strongest, JJK

Installation

$ npx shadcn@latest add https://akshitr.com/r/testimonial.json

Usage

import Testimonial from "@/components/testimonial";
 
const TESTIMONIALS = [
  {
    name: "Sarah Chen",
    role: "Product Designer",
    company: "Linear",
    quote:
      "This component instantly elevated the perceived quality of our landing page.",
    avatar: "https://images.unsplash.com/...",
  },
  {
    name: "Marcus Rivera",
    role: "Frontend Engineer",
    company: "Vercel",
    quote:
      "The motion feels incredibly polished while still remaining lightweight.",
    avatar: "https://images.unsplash.com/...",
  },
];
 
export default function Demo() {
  return <Testimonial testimonials={TESTIMONIALS} />;
}

Component API

Testimonial

PropTypeDefaultDescription
testimonialsTestimonial[]Array of testimonials rendered in the carousel.
className?stringAdditional classes applied to the root section.
autoPlay?booleantrueEnable autoplay rotation.
interval?number5000Autoplay interval in milliseconds.

Testimonial Type

PropTypeDefaultDescription
namestringName of the person giving the testimonial.
rolestringRole or job title displayed below the quote.
companystringCompany name shown alongside the role.
quotestringMain testimonial content displayed prominently.
avatarstringAvatar image rendered in the stacked selector.

Interactions

TriggerBehaviour
AutoplayAutomatically cycles through testimonials every 5 seconds.
Hover componentPauses autoplay while the user is interacting with the section.
Click avatarActivates the selected testimonial with animated transitions.
ArrowLeft / ArrowRightNavigates between testimonials using keyboard controls.
Active stateActive avatar scales forward while surrounding avatars fan out.
Quote transitionQuotes animate with blur, fade, and vertical motion transitions.

Features

  • Smooth quote transitions powered by motion
  • Layered avatar fan layout with spring animations
  • Keyboard accessible navigation
  • Autoplay with hover pause support
  • Responsive layout optimized for landing pages and showcases
  • Minimal API surface with customizable styling