Setup Guide
Embed Flowvi Forms in React
Add Flowvi forms to your React app with a reusable component
Get Your Embed CodeStep-by-Step Guide
1
Create a FlowviForm component
Create a reusable React component that wraps the Flowvi iframe:
interface FlowviFormProps {
formId: string;
height?: number;
className?: string;
}
export function FlowviForm({ formId, height = 600, className }: FlowviFormProps) {
return (
<iframe
src={`https://flowvi.dev/submit/${formId}`}
width="100%"
height={height}
frameBorder="0"
className={className}
style={{ border: 'none', borderRadius: 12 }}
allowFullScreen
/>
);
}2
Use the component in your pages
Import and use the FlowviForm component anywhere in your React app:
import { FlowviForm } from './FlowviForm';
function ContactPage() {
return (
<div className="max-w-2xl mx-auto">
<h1>Contact Us</h1>
<FlowviForm formId="your-form-id" height={700} />
</div>
);
}3
Listen for submission events (optional)
Use postMessage to detect when a form is submitted:
useEffect(() => {
const handler = (event: MessageEvent) => {
if (event.data?.type === 'flowvi:submitted') {
console.log('Form submitted!', event.data);
}
};
window.addEventListener('message', handler);
return () => window.removeEventListener('message', handler);
}, []);4
Test your integration
Run your React app, navigate to the page with the form, submit it, and verify the data appears in Flowvi.
Frequently Asked Questions
Does Flowvi have an official React SDK?
Flowvi uses iframe-based embeds, which work with any React setup. The reusable component pattern shown above is the recommended approach.
Can I use Flowvi with Next.js?
Yes. The FlowviForm component works in Next.js. For SSR, wrap the iframe in a dynamic import with ssr: false or use the HTML embed guide.
How do I pass data from my React app to the form?
Use URL query parameters: append ?name=John&email=john@example.com to the iframe src URL. Flowvi will pre-fill matching form fields.
All Embed Guides
Ready to embed?
Create your form and get the embed code in minutes. Free plan available.
Get Started Free