testimon-embed
v1.1.0
Published
Embed Testimon testimonial widgets in any website. React component and vanilla JS API.
Maintainers
Readme
testimon-embed
Embed Testimon testimonial widgets in any website. Works with React, Next.js, Vue, Svelte, or plain HTML.
Installation
npm install testimon-embedReact / Next.js
import { TestimonWidget } from "testimon-embed";
function Testimonials() {
return <TestimonWidget spaceId="your-space-id" />;
}Props
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| spaceId | string | required | Your space ID from the Testimon dashboard |
| baseUrl | string | https://testimon.solutionlabtech.com | Base URL of your Testimon instance |
| noCache | boolean | false | Bypass CDN cache (useful during development) |
| className | string | — | CSS class for the container div |
| onLoad | () => void | — | Called when the widget script loads |
| onError | (error: Error) => void | — | Called if the script fails to load |
Next.js App Router
Since the widget injects a script tag, use it inside a client component:
"use client";
import { TestimonWidget } from "testimon-embed";
export function TestimonialsSection() {
return (
<section>
<h2>What our customers say</h2>
<TestimonWidget spaceId="your-space-id" />
</section>
);
}Vanilla JavaScript
import { initTestimonWidget } from "testimon-embed";
const cleanup = initTestimonWidget(document.getElementById("testimonials"), {
spaceId: "your-space-id",
});
// To remove the widget later:
cleanup();Options
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| spaceId | string | required | Your space ID |
| baseUrl | string | https://testimon.solutionlabtech.com | Base URL |
| noCache | boolean | false | Bypass CDN cache |
Script Tag (no bundler)
If you're not using a bundler, you can embed the widget directly:
<div data-testimon-space-id="your-space-id"></div>
<script src="https://testimon.solutionlabtech.com/widget.js" async></script>Finding Your Space ID
- Log in to your Testimon dashboard
- Go to Spaces and click on your space
- Your space ID is shown in the Embed Code section
Widget Customization
Customize the widget appearance (layout, colors, fonts, etc.) from your Testimon dashboard under Spaces > Your Space > Widget. Changes apply automatically — no code updates needed.
Available Layouts
- Grid — Responsive multi-column grid (default)
- Carousel — Horizontal scrollable cards
- List — Single-column vertical list
- Marquee — Infinite scrolling animation (Starter+)
- Badge — Floating rating badge (Pro)
License
MIT
