Overview
Instructions
Overview
Instructions
Overview
Formspree is the fastest way to collect form submissions for your Vercel site. Formspree provides:
This integration lets you connect Formspree to your Vercel projects, and add forms. It automatically sets up appropriate environment variables to use in your form code.
Instructions
After you have followed the prompts to connect Formspree with one or more Vercel projects, you'll find environment variables that correspond to your new Formspree project type.
You'll find the following Environment Variable:
NEXT_PUBLIC_FORM
This environment variable can be used along with the useForm
hook from the @formspree/react library to initialize your form like so:
const [formState, submit] = useForm(process.env.NEXT_PUBLIC_FORM)
For more information see the Formspree guide for Next.js.
You'll find the following Environment Variables:
NEXT_PUBLIC_FORMSPREE_PROJECT
FORMSPREE_DEPLOY_KEY
For more information about using the CLI see our help guide.