Integration Guide

Add Customer Testimonials to Your React Site

Add testimonials to any React application with the PraisedBy npm package. Full TypeScript support, tree-shakeable, and lightweight.

3 Steps to Add Testimonials on React

1

Step 1: Create Your Account

Create a free PraisedBy account and set up your testimonial space. Start collecting customer reviews.

2

Step 2: Collect Testimonials

Install the package: npm install praisedby-embed. Import the React component into your app.

3

Step 3: Embed the Widget

Render <PraisedByWidget /> with your space ID. The widget mounts with Shadow DOM isolation and handles all data fetching automatically.

Embed Code for React

// React Component
import { PraisedByWidget } from "praisedby-embed/react";

function App() {
  return (
    <div className="testimonials">
      <PraisedByWidget
        spaceId="YOUR_SPACE_ID"
        layout="carousel"
        theme="dark"
      />
    </div>
  );
}

Why PraisedBy for React

npm Package

Install via npm or yarn. Tree-shakeable ESM/CJS with zero dependencies.

Customizable Props

Pass theme, layout, colors, and more as React props for full control.

Shadow DOM

Styles are isolated from your app. No CSS-in-JS or module conflicts.

Tiny Bundle

Under 12 KB gzipped. Minimal impact on your React app's bundle size.

Frequently Asked Questions

What is the bundle size of the React component?

The praisedby-embed React package is under 12 KB gzipped and tree-shakeable. It has zero dependencies beyond React itself.

Does it work with Create React App, Vite, and other bundlers?

Yes. The package is published as ESM and CJS, making it compatible with every modern React setup including CRA, Vite, Parcel, and webpack.

Can I use hooks to fetch testimonials programmatically?

Yes. The package exports a usePraisedBy hook that gives you direct access to testimonial data for custom rendering in your React components.

Ready to Add Testimonials to React?

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

Start Free