Premium

Contact Form (Single File Component + Fetch)

By FrontendAtlas Editorial · Updated Jan 30, 2026

Challenge summary

Build a contact form in a Vue 3 single file component using the Composition API. The template and styles are already provided for you.

What you'll practice

  • Use Vue 3's Composition API in a single-file component (App.Vue).
  • Use refs to track form fields: name, email, and message.
  • Make all fields required; validate email with a basic email pattern and require a minimum length for the message (e.g. at least 10 characters).
  • Disable the submit button while the form is invalid or while a request is in progress.
  • On submit, send a POST request with the form body to https://jsonplaceholder.typicode.com/posts.

What Premium unlocks

Premium unlocks the runnable workspace, behavioral checks, implementation walkthrough, and edge-case discussion. It also runs as an Interview Pressure Mode, in rounds that add requirements the way an interviewer does.

Free related practice

Upgrade to FrontendAtlas Premium to unlock this challenge. Already upgraded? Sign in to continue.

Premium is $24 a month or $99 a year, less in many countries.