Integration Guide

Add Customer Testimonials to Your Next.js Site

Integrate PraisedBy testimonials into your Next.js application with our official npm package. Full TypeScript support and SSR-compatible.

3 Steps to Add Testimonials on Next.js

1

Step 1: Create Your Account

Create a free PraisedBy account and set up your testimonial space. Collect reviews by sharing your unique link or embedding the form.

2

Step 2: Collect Testimonials

Install the npm package: npm install praisedby-embed. Import the PraisedByWidget component into your Next.js page or component.

3

Step 3: Embed the Widget

Add the <PraisedByWidget /> component with your space ID. The widget renders client-side with full SSR compatibility and Shadow DOM isolation.

Embed Code for Next.js

// Next.js Component
import { PraisedByWidget } from "praisedby-embed/react";

export default function TestimonialsSection() {
  return (
    <section>
      <h2>What Our Customers Say</h2>
      <PraisedByWidget
        spaceId="YOUR_SPACE_ID"
        layout="grid"
        theme="light"
      />
    </section>
  );
}

Why PraisedBy for Next.js

React Component

First-class React component with TypeScript types. Import and use like any React lib.

SSR Compatible

Works with Next.js server-side rendering, static generation, and client components.

Shadow DOM

Widget styles are fully isolated. No conflicts with your Tailwind or CSS modules.

REST API Access

Fetch testimonials server-side for custom rendering or pre-rendering.

Frequently Asked Questions

Does PraisedBy support Next.js App Router?

Yes. The PraisedByWidget component works with both the App Router and Pages Router. It renders as a client component with the 'use client' directive automatically handled by the package.

Can I fetch testimonials server-side with the API?

Yes. PraisedBy offers a full REST API (Pro plan) that you can call from Next.js server components, API routes, or getServerSideProps for full SSR.

Does the npm package support TypeScript?

Yes. The praisedby-embed package ships with full TypeScript definitions for all components, hooks, and configuration options.

Ready to Add Testimonials to Next.js?

Set up PraisedBy in under 5 minutes. Free plan included.

Start Free