Add a Contact Form to Gatsby
Use the official @boosterpack/react-form package for a native React integration with your Gatsby site. Handles Proof-of-Work, spam protection, and submission automatically.
Setup Guide
Takes about 2 minutes
Sign in to your account dashboard and create a new form. Add your destination email(s) and optionally connect webhook integrations (Slack, Discord, etc.). Then copy your form ID.
Run npm i @boosterpack/react-form in your Gatsby project. No embed script needed — the package handles everything.
Use the <BoosterpackForm> component or the useBoosterpackForm hook in any page or component. See the code snippets below.
Gatsby uses client-side React by default, so no special configuration is needed.
Deploy your Gatsby site (Gatsby Cloud, Netlify, Vercel — anywhere). When you visit the page with your form, you'll see an overlay with an Activate form button. Click it to activate the domain. Your form is live once at least one recipient has confirmed (from Step 1) and the domain is activated.
Code to Copy
Get your form ID from your account dashboard.
<form method="POST" action="https://boosterpackforms.com/api/forms/<FORM_ID>/submit">
<input name="name" placeholder="Name" required />
<input name="email" type="email" placeholder="Email" required />
<textarea name="message" placeholder="Message" required></textarea>
<button type="submit">Send</button>
</form>npm i @boosterpack/react-form'use client'
import { BoosterpackForm } from '@boosterpack/react-form'
export function ContactForm() {
return (
<BoosterpackForm formId='<FORM_ID>'>
{({ status, error }) => (
<>
<input name='name' placeholder='Name' required />
<input name='email' type='email' placeholder='Email' required />
<textarea name='message' placeholder='Message' required />
<button type='submit' disabled={status === 'sending'}>
{status === 'sending' ? 'Sending…' : 'Send'}
</button>
{status === 'success' && <p>Sent!</p>}
{status === 'error' && error && <p>{error}</p>}
</>
)}
</BoosterpackForm>
)
}Gatsby SSR: The React package only runs on the client side. During static generation, the form renders normally and the Proof-of-Work is solved at runtime in the browser.
Activating Your Domain
When you create a form, each recipient receives a confirmation email right away — they must confirm before receiving submissions.
When you load a page with your form on a domain that hasn't been activated yet, you'll see an overlay with an Activate form button. Click it to activate the domain. The form goes live once at least one recipient has confirmed and the domain is activated. This only happens once per domain.
What's Included
Free plan · No credit card required