A monorepo containing libraries for seamless form integration with Formspree via JavaScript and/or React.
Core submission client and types. Provides createClient, getDefaultClient, SubmissionError, and submission types.
npm install @formspree/core
yarn add @formspree/core
pnpm add @formspree/coreReact hooks (useForm, useSubmit) and components (ValidationError) built on top of core.
Prerequisites: React 16.8 or higher.
npm install @formspree/react
yarn add @formspree/react
pnpm add @formspree/reactNote: @formspree/core is a dependency of @formspree/react, so you don't need to install it separately.
Vanilla JavaScript library for declarative form handling with plain HTML forms. No framework required — use data attributes and a single initForm() call, or load via a script tag with the window.formspree() global API.
npm install @formspree/ajax
yarn add @formspree/ajaxNote: @formspree/core is a dependency of @formspree/ajax, so you don't need to install it separately.
Or via CDN (no bundler needed):
<script>
window.formspree =
window.formspree ||
function () {
(formspree.q = formspree.q || []).push(arguments);
};
formspree('initForm', { formElement: '#my-form', formId: 'YOUR_FORM_ID' });
</script>
<script src="https://unpkg.com/@formspree/ajax@1" defer></script>See the @formspree/ajax README for full documentation.
For help and support please see the Formspree React docs.
Please follow our contributing guidelines.