React Form with Backend

Add backend submission to your React forms in 2 minutes. No server code required.

Complete Working Example

This code creates a fully functional contact form with backend submission. Copy and paste to get started:

import { useFormFlow } from '@formflow.sh/react';
import { Input } from '@/components/ui/input';
import { Button } from '@/components/ui/button';

export function ContactForm() {
  const { register, handleSubmit, formState } = useFormFlow({
    apiKey: process.env.NEXT_PUBLIC_FORMFLOW_API_KEY,
    onSuccess: () => alert('Thanks for your message!'),
  });

  return (
    <form onSubmit={handleSubmit} className="space-y-4">
      <Input {...register('email')} type="email" required />
      <Input {...register('name')} required />
      <textarea {...register('message')} required />
      <Button type="submit" disabled={formState.isSubmitting}>
        {formState.isSubmitting ? 'Sending...' : 'Submit'}
      </Button>
    </form>
  );
}

No Server Code

No API routes. No serverless functions. No backend setup. FormFlow handles it all.

Works with Any UI Library

shadcn/ui, Material-UI, Chakra UI, or native HTML. Use your existing components.

Built-in Validation

Client-side validation via react-hook-form. Server-side validation for security.

Production Ready

Rate limiting, spam protection, email notifications, and webhook support included.

How It Works

1

Install the package

npm install @formflow.sh/react
2

Get your API key

Free tier: 50 submissions/month. No credit card required.

3

Use the hook in your form

Wraps react-hook-form with backend submission. All the power, zero boilerplate.

Perfect For

  • Contact forms on landing pages
  • Newsletter signup forms
  • Feedback and support forms
  • Lead generation forms
  • Survey and poll forms
  • Any form needing backend submission

Ready to add backend to your React forms?

Get started in 2 minutes. No credit card required.

React Form with Backend - FormFlow | No Server Code Required | FormFlow