Skip to content

Repository files navigation

FormsReach SDK

npm @formsreach/jsnpm @formsreach/reactnpm @formsreach/vuenpm @formsreach/nodeCILicense: MIT

Official client libraries for FormsReach — a form backend and form API for static sites and modern frameworks. Submit HTML, React, or Vue forms without running your own server; manage forms and submissions from Node.js.

Features

  • CDN drop-in — one script tag + data-formsreach on any form
  • Plain JS / ESM@formsreach/js for vanilla apps and custom UIs
  • React & Next.jsuseFormsReach hook
  • Vue & NuxtuseFormsReach composable
  • Node.js@formsreach/node management SDK (forms & submissions)
  • TypeScript — published types for all packages
  • Zero runtime deps on the core JS and Node SDKs

Packages

PackageInstallUse case
@formsreach/jsCDN or npm i @formsreach/jsPlain HTML / vanilla JS
@formsreach/reactnpm i @formsreach/reactReact & Next.js
@formsreach/vuenpm i @formsreach/vueVue & Nuxt
@formsreach/nodenpm i @formsreach/nodeNode management (forms / subs)

Quick start

HTML

<formaction="https://api.formsreach.com/submit" method="POST"><inputtype="hidden" name="api_key" value="YOUR_API_KEY" /><inputtype="text" name="name" required/><inputtype="email" name="email" required/><textareaname="message" required></textarea><buttontype="submit">Submit Form</button></form>

Get an API key from the FormsReach dashboard.

Javascript

<scriptsrc="https://unpkg.com/@formsreach/js/dist/formsreach.min.js"></script><script>FormsReach.init({apiKey: "fr_your_key"});</script><formdata-formsreach><inputtype="text" name="name" required/><inputtype="email" name="email" required/><textareaname="message" required></textarea><buttontype="submit">Submit</button></form>

Get an API key from the FormsReach dashboard. See packages/js for programmatic submitForm usage.

React / Next.js

npm install @formsreach/react
import{useFormsReach}from"@formsreach/react";const{ submit, submitting }=useFormsReach("fr_your_key");// <form onSubmit={submit}>…</form>

Full guide: packages/react.

Vue / Nuxt

npm install @formsreach/vue
<script setup>import { useFormsReach } from"@formsreach/vue";const { submit, submitting } =useFormsReach("fr_your_key");</script>

Full guide: packages/vue.

Node.js (management)

npm install @formsreach/node
import{FormsReach}from"@formsreach/node";constfr=newFormsReach({apiKey: process.env.FORMSREACH_API_KEY!});const{ items }=awaitfr.forms.list();constpage=awaitfr.submissions.list(items[0]!.id,{limit: 50});

Uses a developer API key (Bearer), not the public form fr_… key. Full guide: packages/node.

Examples

StackPath
HTML / plain JSexamples/html
Reactexamples/react
Next.jsexamples/nextjs
Vueexamples/vue
Nuxtexamples/nuxt
Nodeexamples/node

Monorepo

pnpm install
pnpm -r build
pnpm -r test
pnpm lint
pnpm format
pnpm check # format:check + lint + typecheck + test + build (also runs on pre-push)

Contributing

  • Use the GitHub issue templates for bugs and feature requests.
  • Open a PR against main. The PR template includes a short checklist.
  • For changes that affect published packages (@formsreach/js, @formsreach/react, @formsreach/vue, @formsreach/node), run pnpm changeset, choose a bump type, and commit the new file under .changeset/.
  • Browser packages (js / react / vue) version in lockstep. @formsreach/node versions independently.
  • See Changesets for details.

Git hooks (Husky): Conventional Commits on commit-msg; lint-staged on pre-commit; full pnpm check on pre-push.

Releasing

The Version Packages PR is opened automatically by GitHub Actions when changesets land on main.

  1. Merge PRs that include changesets into main.
  2. The Release workflow opens or updates a Version Packages PR (bumps all packages together, updates each package CHANGELOG.md).
  3. Review and merge the Version Packages PR.
  4. The same workflow publishes to npm (pnpm release → build + changeset publish).

Maintainer setup (one-time): add a GitHub Actions secret NPM_TOKEN with publish access to the @formsreach npm scope. First public ship should use a real changeset (e.g. "Initial public release") via a Version PR — not a tooling-only dummy bump.

License

MIT


Part of FormsReach — form backend / contact form API. Product: formsreach.com · AI skill: formsreach/skills

About

Official FormsReach client SDKs for JavaScript, React, and Vue - drop-in form backend for static sites and modern frameworks

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages