VitePress logo

A backend for your VitePress forms

Keep full control over the look and feel of your VitePress forms.

VitePress is a static site generator powered by Vite and Vue, designed for creating documentation websites.

Getting started with VitePress is simple

Start collecting data in a matter of clicks.

Let Formspark take care of the servers, databases, and analytics.

Set up any form in seconds.

VueOut of the box Vue support

JamstackCompatible with Jamstack

markup
<!-- .vitepress/theme/components/ContactForm.vue -->
<script setup>
import { ref } from "vue";

const FORMSPARK_ACTION_URL = "https://submit-form.com/your-form-id";

const message = ref("");
const submitting = ref(false);

async function onSubmit() {
  submitting.value = true;
  try {
    await fetch(FORMSPARK_ACTION_URL, {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        Accept: "application/json",
      },
      body: JSON.stringify({ message: message.value }),
    });
    message.value = "";
  } finally {
    submitting.value = false;
  }
}
</script>

<template>
  <ClientOnly>
    <form @submit.prevent="onSubmit">
      <textarea v-model="message" />
      <button type="submit" :disabled="submitting">Send</button>
    </form>
  </ClientOnly>
</template>
Start collecting submissions with Formspark

Formspark is a reliable backend for your forms.

Keep full control over the look and feel of your forms.

Let Formspark take care of the rest.

No credit card required