Docs / React
A React contact form with no server
One component, no dependency: ContactForm.jsx posts a FormData body with plain fetch to your conForm endpoint and reports the outcome through a role="status" live region. Works in any React setup — Vite, CRA leftovers, Remix routes, anywhere.
1 — Create the endpoint
curl https://api.conform.centrst.com/v1/routes \
-H 'Content-Type: application/json' \
-d '{"email":"[email protected]","alias":"Contact"}'
2 — Fetch the component
curl 'https://api.conform.centrst.com/v1/routes/YOUR_FORM_ID/install?framework=react&raw=1' > src/ContactForm.jsx
Import and render it anywhere. It ships unstyled semantic markup (labels, autoComplete, honeypot, live region) so it inherits your styling; edit freely — just keep the hidden _gotcha field and keep it empty.
import ContactForm from './ContactForm';
export default function ContactPage() {
return <ContactForm />;
}
3 — Verify and prove
The destination inbox confirms one verification email; the endpoint URL never changes while pending. Then prove delivery with a marked test:
curl -sS -X POST https://api.conform.centrst.com/f/cfm_7K4P9X2M8RWD3JNH \
-d 'name=Test&[email protected]&message=Hello from a test&_test=true'
Using Next.js? The Next.js recipe serves the same component with the
'use client' directive prepended.