Docs / Svelte
A Svelte contact form with no server
ContactForm.svelte posts with plain fetch, tracks status in component state, and announces the outcome in a polite live region. Works in SvelteKit pages and plain Vite + Svelte setups alike — with no server route and no adapter requirements.
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=svelte&raw=1' > src/lib/ContactForm.svelte
<script>
import ContactForm from '$lib/ContactForm.svelte';
</script>
<ContactForm />
3 — Verify and prove
Confirm the verification email in the destination inbox, then send a marked test submission — the response returns test: true as proof:
curl -sS -X POST https://api.conform.centrst.com/f/cfm_7K4P9X2M8RWD3JNH \
-d 'name=Test&[email protected]&message=Hello from a test&_test=true'