Beginner4 min readUpdated Mar 27, 2026

How to Add a Contact Form to Nuxt.js (No Backend Required)

Add a working contact form to Nuxt 3 using FormsList.

TL;DR

Add a contact form to Nuxt.js using $fetch and a FormsList endpoint. No Nitro API routes needed — create a form endpoint at formslist.com, add a few lines of code, and start receiving submissions with spam filtering and email alerts.

By Vaibhav Jain·Published March 27, 2026

Prerequisites

  • Nuxt 3 project
  • FormsList account (free)
1

Create a FormsList endpoint

Sign up at formslist.com and create a form.

2

Create the form component

Use Nuxt 3 auto-imported composables.

<script setup>
const name = ref('')
const email = ref('')
const message = ref('')
const submitted = ref(false)

async function handleSubmit() {
  await $fetch('https://formslist.com/f/YOUR_HASH', {
    method: 'POST',
    headers: { Accept: 'application/json' },
    body: { name: name.value, email: email.value, message: message.value },
  })
  submitted.value = true
}
</script>

<template>
  <p v-if="submitted">Thanks!</p>
  <form v-else @submit.prevent="handleSubmit">
    <input v-model="name" placeholder="Name" required />
    <input v-model="email" type="email" placeholder="Email" required />
    <textarea v-model="message" placeholder="Message" required />
    <button type="submit">Send</button>
  </form>
</template>
3

Add to a page

Use the component in any pages/*.vue file.

4

Deploy

Deploy and test.

Frequently Asked Questions

Ready to collect form submissions?

Set up your form backend in under a minute. No server required, no complex configuration — just a simple endpoint for your forms.