All integrations

nextjs.org

Collect testimonials on Next.js

Next.js teams obsess over bundle size and Core Web Vitals. Most testimonial widgets are React components that bloat your bundle. Trustfolio is a vanilla-JS script — zero impact on your Next.js build, zero hydration cost.

Why Next.js users pick Trustfolio

Next.js indie hackers and startup teams prefer a drop-in script over a bloated npm package. AI scoring + Shadow DOM isolation keeps their pristine setup intact.

Adding a React-based testimonial npm package can add 40–80KB gzip to your bundle. Trustfolio adds 0 to your bundle (external script).

Setup in under 2 minutes

  1. 1In your Next.js layout or page, import Next's Script component: import Script from 'next/script'.
  2. 2Place <div data-trustfolio="YOUR_ID" /> where the widget should render.
  3. 3Add <Script src="https://trustfolio.dev/embed.js" strategy="afterInteractive" /> to the page.
  4. 4Deploy — Next.js code-splits and defers the widget automatically.
<div data-trustfolio="YOUR_WIDGET_ID"></div>
<script src="https://trustfolio.dev/embed.js" async></script>

Frequently asked

Do I need to install an npm package?

No. The embed is a script tag loaded at runtime.

Does it work with the App Router?

Yes. Use next/script inside any Server or Client Component.

Will it affect my Lighthouse score on Vercel?

Negligibly. We measured +8ms LCP on a Next.js 14 + Vercel deploy.

Can I render it server-side?

The widget is client-rendered inside a Shadow DOM. SSR would bypass the isolation.

Does it work with Next.js middleware or edge runtime?

Yes — the script runs purely client-side and is independent of your Edge routes.

Try Trustfolio on Next.js

Free plan includes 15 testimonials, basic AI scoring, and the same sub-5KB widget. No credit card.

Start free