Official packages for Formgong, the form backend for contact forms. Your form posts to Formgong, and each submission arrives by email, Telegram or webhook. You don't need a server, a database or SMTP. There is a free plan, data is stored in the EU, and messages come in 12 languages.
npx formgong init # create a form + add a contact page to your Next.js / React / Vue / Svelte / Astro / Angular / HTML project| Package | Version | Use it for |
|---|---|---|
@formgong/core |
Any JS runtime: submit(), typed errors, anti-spam tracker, account API. About 3 kB, no dependencies, ESM + CJS. |
|
@formgong/react |
<ContactForm>, <FormgongForm>, useFormgong() in React, Lovable, Bolt, v0 and Vite |
|
@formgong/next |
Next.js Server Actions (useActionState), Route Handlers, App Router components |
|
@formgong/vue |
Vue 3 and Nuxt components and the useFormgong() composable |
|
@formgong/svelte |
use:formgong action, store helper and components for Svelte 4/5 and SvelteKit |
|
@formgong/astro |
Astro components with progressive enhancement, plus a helper for Astro Actions | |
@formgong/angular |
Angular 17+ standalone component, formgongForm directive and FormgongService with signals |
|
formgong |
CLI: login, init, forms, create, snippet, submissions |
|
create-formgong |
npm create formgong@latest: Next.js, Astro, HTML and React starters |
// React / Next.js / Lovable / Bolt
import { ContactForm } from "@formgong/react";
<ContactForm accessKey="fk_your_access_key" />// Anywhere (Node, Workers, Deno, Bun, browser)
import { submit } from "@formgong/core";
await submit("fk_your_access_key", { email: "[email protected]", message: "Hi!" });---
import ContactForm from "@formgong/astro/ContactForm.astro";
---
<ContactForm accessKey="fk_your_access_key" />// Angular 17+ (standalone)
import { FormgongContactFormComponent } from "@formgong/angular";
@Component({ imports: [FormgongContactFormComponent], template: `<formgong-contact-form accessKey="fk_your_access_key" />` })The access key (fk_…) is public by design: it can only send submissions to your form. Get one free at formgong.com.
- It adds the hidden
access_keyand_langfields and abotcheckhoneypot. Without JavaScript the form still posts natively. - It shows Formgong's localized success or error message in an
aria-liveregion. - It sends the same cookie-free anti-spam signals as Formgong's
fg.js: fill time, typing and paste counts, and a small SHA-256 proof-of-work. Server-side posts never fabricate them and are never penalised for lacking them. - Errors are typed, with stable codes (
unknown_access_key,rate_limited,turnstile_missing, …).
Formgong delivers to Telegram as well as email, stores data in the EU, works in 12 languages and has a free plan. See the side-by-side comparison with Formspree, Web3Forms, Basin, Getform, FormSubmit and Netlify Forms: formgong.com/en/compare. Coming from Formspree? Switch in one line.
pnpm install
pnpm build && pnpm typecheck && pnpm testpackages/*: published packages (pnpm workspaces, tsup, vitest;@formgong/angularis built with ng-packagr in partial Ivy mode).examples/next-server-action: Next.js Server Action example.scripts/e2e.mjs: end-to-end check against a live Formgong deployment.- Releases: Changesets + a manual GitHub Actions workflow with npm provenance. See RELEASING.md. (Workflows live in
.github/workflows-to-enable/until they are moved into.github/workflows/.)
Docs: https://formgong.com/en/docs/ · MCP server: https://formgong.com/en/docs/mcp/ · Support: [email protected]
MIT © Formgong