Testimonial widget for Next.js

Add testimonials to a Next.js site with a client component, or render them on the server from the REST API.

N

Short answer

In Next.js, render the widget's <div data-vt-widget …> in a client component that loads https://videotestimonials.video/embed.js in a useEffect, so the widget initialises after client-side navigation too. The widget renders in the browser; to put testimonials in the server-rendered HTML, fetch them from the VideoTestimonials REST API in a Server Component.

Steps checked against Next.js's documentation on 8 October 2026.

Testimonials on a Next.js site

How to add testimonials to Next.js

  1. 1In VideoTestimonials, open Studio → Widgets, open (or create) a widget, and copy the code from its Code tab (HTML / Script)
  2. 2Create a 'use client' component that renders the <div data-vt-widget …> and appends embed.js in a useEffect
  3. 3Use the component on any page — or fetch testimonials from the REST API in a Server Component
The code you paste into Next.js looks like this
<div data-vt-widget="carousel" data-vt-space-id="YOUR_SPACE_ID"></div>
<script src="https://videotestimonials.video/embed.js" async></script>

Where to put testimonials on Next.js

A client component (works with client-side navigation)

The quickest way to show the widget on any App Router or Pages Router page.

  1. In VideoTestimonials, open Studio → Widgets, open (or create) a widget, and copy the code from its Code tab (HTML / Script).
  2. Create a client component that renders the <div> with the same data-vt-* attributes.
  3. Append the embed.js script in a useEffect, and remove it in the cleanup, so the widget initialises whenever the component mounts.
  4. Import the component into the page where the testimonials should appear.
app/components/Testimonials.tsx
"use client";

import { useEffect } from "react";

export function Testimonials() {
  useEffect(() => {
    const script = document.createElement("script");
    script.src = "https://videotestimonials.video/embed.js";
    script.async = true;
    document.body.appendChild(script);
    return () => script.remove();
  }, []);

  // Copy these attributes from your widget's Code tab.
  return <div data-vt-widget="carousel" data-vt-space-id="YOUR_SPACE_ID" />;
}

Loading embed.js with next/script in a layout runs it once per visit. Widgets on pages reached later by client-side navigation would not initialise, which is why the script is appended when the component mounts.

Server-rendered testimonials from the REST API

You want testimonials in the HTML that search engines and AI crawlers read first, styled with your own components.

  1. Create an API key in the VideoTestimonials dashboard under Settings → API Keys and store it in an environment variable such as VT_API_KEY.
  2. In a Server Component, fetch https://app.videotestimonials.video/api/v1/testimonials?status=approved&space_id=YOUR_SPACE_ID with Authorization: Bearer and the key.
  3. Cache the response with fetch's next.revalidate option so the API isn't called on every request.
  4. Render the data array with your own components.
app/testimonials/page.tsx
type Testimonial = {
  id: string;
  submitter_name: string;
  text_content: string | null;
  rating: number | null;
};

export default async function TestimonialsPage() {
  const res = await fetch(
    "https://app.videotestimonials.video/api/v1/testimonials?status=approved&space_id=YOUR_SPACE_ID",
    {
      headers: { Authorization: `Bearer ${process.env.VT_API_KEY}` },
      next: { revalidate: 3600 },
    },
  );
  const { data }: { data: Testimonial[] } = await res.json();

  return (
    <ul>
      {data.map((t) => (
        <li key={t.id}>
          <blockquote>{t.text_content}</blockquote>
          <p>{t.submitter_name}</p>
        </li>
      ))}
    </ul>
  );
}

API access is part of the Pro plan. The key stays on the server because the fetch runs in a Server Component.

Source: Next.js docs: fetch and next.revalidate

Good to know before you start

  • The embed widget renders in the browser, so its testimonials aren't in the server-rendered HTML. The REST API recipe puts them there.
  • next/script loads a script once per visit, and embed.js initialises only the widget divs present when it runs — hence the client component recipe.
  • Call the REST API from Server Components or route handlers only; the API key is a secret.

How VideoTestimonials compares with other testimonial tools

Prices read from each vendor's own pricing page; oldest check 2026-11-01. VideoTestimonials prices from our pricing page.
ToolTypeFree planEntry paid planUnlimited video fromBest for
VideoTestimonialsTestimonial collection20 text testimonials + 10 video testimonials, no time limitStarter: $24/monthStarter, $24/monthVideo and text testimonials collected by link and embedded on any site
SenjaTestimonial collection15 testimonials in total, video and text combinedStarter: $29/monthStarter, $29/monthPolished widgets and rewards for one brand
Testimonial.toTestimonial collection2 video and 10 text testimonials in totalStarter: $30/monthUltimate, $60/month per space ($50 billed yearly)Text testimonials and importing posts from X and LinkedIn
FamewallTestimonial collection10 testimonials, 1 video, 1 wallStandard: $15/monthProfessional, $29/month ($25 billed yearly)Cheap walls of mostly written testimonials

Next.js testimonials: frequently asked questions

Can testimonials be server-rendered in Next.js?

Yes, with the REST API: fetch approved testimonials in a Server Component and render them yourself. The embed widget itself renders in the browser.

Why use a client component instead of next/script?

next/script loads the script once per visit. embed.js initialises the widget divs present when it runs, so a widget on a page reached by client-side navigation wouldn't render. Appending the script when the component mounts avoids that.

Which API base URL should I call?

https://app.videotestimonials.video/api/v1. Requests to /api on the main domain are redirected to the app host, and some HTTP clients drop the Authorization header across a redirect.

Is there a free plan for using VideoTestimonials on Next.js?

Yes. The Free plan includes 20 text testimonials and 10 video testimonials and a Wall of Love you can embed on Next.js, with no time limit and no credit card. Starter, at $24/month, adds unlimited testimonials and every widget type.

Why Add Testimonials to Next.js?

A small client component that works with client-side navigation

Server-rendered testimonials through the REST API

Works with the App Router and the Pages Router

Start building trust today

Add testimonials to Next.js.
Video and text.

Collect video and text testimonials with a link, embed them on Next.js, and style them to match your brand. Free plan, no credit card, nothing expires.

Free forever plan
No credit card required
Cancel anytime