@vouchwall/react
v0.1.1
Published
Headless React SDK for Vouchwall - Build custom testimonial UIs with zero opinions
Maintainers
Readme
@vouchwall/react
Headless React SDK for Vouchwall. Build custom testimonial UIs with zero opinions.
Installation
npm install @vouchwall/react
# or
yarn add @vouchwall/react
# or
pnpm add @vouchwall/react
# or
bun add @vouchwall/reactQuick Start
import { VouchwallProvider, useVouchwallWall } from "@vouchwall/react";
function App() {
return (
<VouchwallProvider apiKey="your-api-key">
<TestimonialWall />
</VouchwallProvider>
);
}
function TestimonialWall() {
const { testimonials, loading, error } = useVouchwallWall({
wallId: "your-wall-id",
});
if (loading) return <div>Loading...</div>;
if (error) return <div>Error: {error.message}</div>;
return (
<div>
{testimonials.map((testimonial) => (
<div key={testimonial.id}>
<p>{testimonial.content}</p>
<p>— {testimonial.customerName}</p>
</div>
))}
</div>
);
}Features
- 🎨 Headless: Bring your own UI components
- ⚡️ Fast: Optimized for performance
- 🔒 Type-safe: Written in TypeScript
- 🪝 React Hooks: Modern React patterns
- 📦 Zero dependencies: Lightweight and tree-shakeable
- 🎯 Analytics: Built-in event tracking
API Reference
See the full documentation for detailed API reference and examples.
License
MIT
