Skip to main content

Documentation Index

Fetch the complete documentation index at: https://doc.spike.ac/docs/llms.txt

Use this file to discover all available pages before exploring further.

Why Spike with v0

v0 generates beautiful UI components. When those components include forms, Spike handles the backend — submissions, emails, webhooks — so the forms actually work.

How to Use

v0 generates React components from prompts. Include Spike details in your prompt:

In Your Prompt

Create a contact form component that submits to https://api.spike.ac/f/MY_ORG/contact
using fetch with FormData. Include name, email, and message fields.
Add a hidden _gotcha field for spam protection.
Handle loading, success, and error states.

Example Prompts

Styled Contact Form

Create a modern contact form with shadcn/ui components.
Submit to https://api.spike.ac/f/MY_ORG/contact via AJAX POST.
Include name, email, subject, and message fields.
Add a hidden _gotcha input for spam protection.
Show a toast notification on success.
Use proper loading states on the submit button.

Newsletter Signup

Create a minimal newsletter signup component with just an email field
and a submit button. POST to https://api.spike.ac/f/MY_ORG/newsletter
using fetch. Add _gotcha honeypot. Show inline success/error messages.

Feedback Widget

Create a floating feedback widget (bottom-right corner) that expands
into a form with rating (1-5 stars), category dropdown, and message textarea.
Submit to https://api.spike.ac/f/MY_ORG/feedback via AJAX.
Include _gotcha spam protection. Collapse back after successful submission.

Multi-Step Form

Create a multi-step form with 3 steps:
1. Personal info (name, email, phone)
2. Project details (budget dropdown, timeline, description)
3. Review and submit

Submit all data to https://api.spike.ac/f/MY_ORG/inquiry on the final step.
Add _gotcha honeypot. Show a progress bar and allow going back between steps.

Reference Pattern

If v0 needs guidance on the submission logic:
"use client";

import { useState } from "react";

export function ContactForm() {
  const [status, setStatus] = useState<"idle" | "loading" | "success" | "error">("idle");

  const handleSubmit = async (e: React.FormEvent<HTMLFormElement>) => {
    e.preventDefault();
    setStatus("loading");

    try {
      const res = await fetch("https://api.spike.ac/f/YOUR_ORG/YOUR_FORM", {
        method: "POST",
        body: new FormData(e.currentTarget),
        headers: { Accept: "application/json" },
      });
      setStatus(res.ok ? "success" : "error");
      if (res.ok) e.currentTarget.reset();
    } catch {
      setStatus("error");
    }
  };

  if (status === "success") {
    return <p>Thanks! We'll be in touch.</p>;
  }

  return (
    <form onSubmit={handleSubmit}>
      <input type="text" name="_gotcha" style={{ display: "none" }} />
      <input type="text" name="name" placeholder="Name" required />
      <input type="email" name="email" placeholder="Email" required />
      <textarea name="message" placeholder="Message" required />
      <button type="submit" disabled={status === "loading"}>
        {status === "loading" ? "Sending..." : "Send"}
      </button>
      {status === "error" && <p>Something went wrong. Try again.</p>}
    </form>
  );
}
v0 generates React components. Spike works with any React form — just point the fetch call to your Spike endpoint and you’re done.