Skip to content

@formerie/next

Formerie for Next.js

Send form submissions from Next.js to Formerie, without holding recipients, templates, or provider keys in your code.

Works with

Install

These packages are in alpha, so their APIs may change.

pnpm

pnpm add @formerie/next

npm

npm install @formerie/next

Yarn

yarn add @formerie/next

Bun

bun add @formerie/next

Use it

createFormerieNextAction turns a form into a Server Action, and the package re-exports the React hooks for client components.

You’ll need a published form. Replace example.com and contact with your workspace and form handles from the app.

import { createFormerieNextAction } from "@formerie/next";

const submitContact = createFormerieNextAction({
  workspace: "example.com",
  form: "contact",
});

export function ContactForm() {
  return (
    <form action={submitContact}>
      <input name="email" type="email" />
      <button>Send</button>
    </form>
  );
}

What happens next

Create a workspace and publish your first form.

In early access. New workspaces start on the Free plan.