Next.js

Next.js contact form for any website

Add a Next.js contact form to your website with useFormsReach in a Client Component. No route handlers, no nodemailer, no extra serverless function. Deliver submissions by email with spam filtering and to WhatsApp in seconds, metered with monthly credits.

Set up FormsReach with Next.js

Connect your form in a few steps. No custom backend required.

  1. 1

    Install @formsreach/react

    npm install @formsreach/react and create an API key at FormsReach.

  2. 2

    Add a Client Component

    Create a component with 'use client' at the top. Import useFormsReach and build the form with onSubmit={submit}.

  3. 3

    Import it from a Server Component page

    Render the client form from any page or layout. Test email and/or WhatsApp delivery with your free monthly credits.

Next.js snippet

Copy this into your project, then swap in your FormsReach API key.

          // npm install @formsreach/react
'use client';

import { useFormsReach } from '@formsreach/react';

export default function ContactForm() {
  const { submit, submitting } = useFormsReach('YOUR_API_KEY');

  return (
    <form onSubmit={submit}>
      <input type="text" name="name" required />
      <input type="email" name="email" required />
      <textarea name="message" required />
      <button type="submit" disabled={submitting}>Submit Form</button>
    </form>
  );
}
        

API routes are optional for contact forms

Next.js makes it easy to add app/api/... handlers - and easy to overbuild. For many marketing and product sites, a contact form only needs a reliable form API and email and WhatsApp delivery from one credit pool, not a custom mail stack. Credits meter usage across channels.

Platform notes

Troubleshooting

What you get

Monthly credits for submissions and delivery. Scale when volume grows.

Free

500 credits every month for form submissions, email, webhooks, and workflow rules. Spam filtering included. No credit card required.

Starter, Pro & Agency

Larger monthly credit pools (2,000 / 5,000 / 18,000). WhatsApp via Meta Business API unlocks on Pro and Agency. See pricing.

FAQ

Common questions about FormsReach with Next.js.

Why 'use client'?+

useFormsReach uses client-side form handling. Mark the form component as a Client Component; the rest of the page can stay a Server Component.

Can I avoid API routes entirely?+

Yes for standard contact forms. FormsReach is the form backend, so you do not need app/api/contact/route.ts just to forward email and WhatsApp.

Does this work with static export?+

Yes - the form posts to FormsReach from the browser, so you do not need a Next.js server runtime for submission delivery.

Free vs Pro?+

Deliver by email with spam filtering and to WhatsApp via the official Meta WhatsApp Business API. Usage is metered in monthly credits.

More framework guides that use the same FormsReach form API.

Ready to receive form leads?

Create a free API key. Upgrade when you need more monthly credits.