Staaarter

Rotating Quote Dots

Single centered quote display with small dot indicators below it, one per testimonial. Clicking a dot swaps the displayed quote and attribution. Good for a compact section that wants to feature multiple testimonials without a carousel library.

By Staaarter Team
Testimonials
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its avatar, avatar-initials dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/rotating-quote-dots.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/testimonials/testimonial10.tsx instead.

Usage

The file also exports testimonial10Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.

import { Testimonial10, testimonial10Demo } from "@/components/blocks/testimonials/testimonial10";

export default function Page() {
  return <Testimonial10 {...testimonial10Demo} />;
}

Props

PropTypeDefaultDescription
headingReactNodeundefinedSection heading above the quote.
quotesQuoteEntry[]noneTestimonials to rotate through; the dot row renders one dot per entry.
classNamestringnoneExtra classes for the outer section element.

Types

type QuoteEntry = {
  quote: string;
  name: string;
  role: string;
};

Behavior notes

  • This is a real client component with genuine local state (useState for the active index), not a decorative animation.
  • There is no auto-advance timer: the displayed quote only changes when a viewer clicks a dot.
  • Each dot has an explicit aria-label ("Go to testimonial N") and aria-current on the active dot; the active dot is also visually wider and filled, inactive dots are a small filled circle.
  • The demo props for this block live in a separate sibling file (testimonial10.demo.tsx) rather than the client component file itself, per this repo's client-component demo-file-split rule.