Add a Working Contact Form to Any Astro Website
Connect your Astro forms to Lucid Forms. Securely process submissions and route them to your inbox. Fully compatible with static SSG pages, SSR adapters, and serverless hosting.
<form action="https://api.lucidforms.co/f/{form_id}" method="POST"><input type="email" name="email" placeholder="Email" required /><textarea name="message" placeholder="Message" required></textarea><button type="submit">Send</button></form>
How it works
Whether you wrote your Astro page components by hand or used an AI builder, connecting a working contact form takes under 2 minutes.
Get your form link
Sign up for free and copy your unique form link from the Lucid Forms dashboard.
Add it to your website
Paste the form link into your Astro components, or give it to an AI tool like Cursor, Claude, or Lovable and let it build the form for you.
Receive submissions
Every time someone fills out your form, you'll get a notification in your inbox, Slack, or Notion, with built-in spam filtering.
Let AI Build Your Astro Contact Form
Give your form link to any AI website builder. It generates the Astro component. Lucid Forms handles the submissions.
Create a modern, styled Astro contact form component.
Use this submission endpoint:
https://api.lucidforms.co/f/{form_id}
Requirements:
- Include name, email, and message fields
- Use standard HTML form tag with method POST and endpoint action
- Make it responsive with Tailwind CSS
Everything your Astro contact form needs to actually work
Most Astro templates include styled form components that don't do anything because static pre-rendered pages cannot process submissions. Lucid Forms handles the backend, routing entries to your inbox, Slack, Notion, and more.
Get submissions in your inbox
Every form entry goes straight to your email. No setup, no configuration: it just works from the moment you connect.
No server endpoints or databases
Astro is designed for speed. By using Lucid Forms for your contact form, you can keep your site 100% static and serverless. Host on Vercel, Netlify, Cloudflare Pages, or GitHub Pages.
Spam protection built in
Bots get blocked automatically. Your visitors never see annoying CAPTCHAs, and your inbox stays clean.
Send form data anywhere
Route submissions to Notion, Google Sheets, Slack, or any webhook. Set it up once and every entry flows to the right place.
Lucid Forms vs. Doing It Yourself
See why thousands of developers skip the headache and use Lucid Forms instead.
| Feature / Requirement | The Astro DIY Approach | Lucid Forms Backend |
|---|---|---|
| Server Setup | Configure SSR adapters, write custom API endpoints, connect database servers | Zero Server Setup (✓) |
| Email Delivery | Configure SMTP relays, write HTML email templates, handle bounce rates | Instant Email Delivery (✓) |
| Static Hosting Support | Requires dynamic serverless runtimes to handle API POST requests | 100% Static & Edge Compatible (✓) |
| AI-Generated Code Support | AI cannot write secure database code and server config out-of-the-box | Works Out-of-the-box (✓) |
| Spam Protection & Filtering | Install CAPTCHA widgets, manage secret keys, verify challenge tokens | Automatic Honeypots & ML (✓) |
Add Contact Forms to Astro, Next.js, and Plain HTML Sites
Connect your forms effortlessly. Lucid Forms provides platform-agnostic endpoints that work across all modern hosting environments, frontend frameworks, and AI builders.
Plain HTML
Paste the form endpoint directly into your index.html. No dependencies or frameworks needed.
Astro
Add contact forms to Astro components. Works perfectly with serverless adapters or static exports.
Next.js & React
Submit React form states or use standard post actions in your Next.js app router forms.
Webflow & CMS
Connect Webflow forms, Wix custom inputs, or WordPress layouts to capture leads directly.
AI-Generated Sites
Claude, Cursor, ChatGPT, and Lovable can write static frontend code but need a backend to process data.
Static Site Gen
Add contact pages to Hugo, Jekyll, Gatsby, or Vitepress sites. Keep your site completely static.
Wix & Shopify
Add custom contact forms to e-commerce templates and site builders without extra plugins.
Deploy Anywhere
Host on Vercel, Netlify, Cloudflare Pages, GitHub Pages, or shared hosting. The forms will work.
Frequently Asked Questions
Everything you need to know about setting up Astro contact forms, spam protection, and framework support.
How do I make my Astro contact form actually send messages?
Static Astro pages cannot handle submissions or send emails on their own. With Lucid Forms, you simply set your form's action attribute to your unique Lucid Forms URL and method to POST. Submissions are captured, checked for spam, and forwarded to your inbox automatically.
Do I need to configure Astro SSR adapters or server endpoints to handle forms?
No. You do not need to set up dynamic server adapters (like Node.js, Vercel, or Netlify adapters) or write custom Astro endpoints. Lucid Forms operates client-side or via direct browser submissions, allowing your site to remain completely static.
Can I use client-side JavaScript inside Astro scripts with Lucid Forms?
Yes! Astro components support standard client-side <script> tags. You can bind event listeners, prevent default submission, and submit form data using standard fetch() APIs to keep your users on the same page.
What hosting environments are supported for Astro?
Since Lucid Forms relies on a standard HTTP POST request, it is fully compatible with any hosting provider, including Vercel, Netlify, Cloudflare Pages, GitHub Pages, AWS S3, or traditional shared hosting.
Does Lucid Forms protect Astro forms from spam?
Yes. Every Lucid Forms endpoint has built-in automated spam filtering. We use silent honeypots, IP rate-limiting, and machine learning to block bots without requiring CAPTCHA checkboxes.
Does this work with AI page builders like Claude or Lovable?
Yes! Just prompt your AI builder to generate a styled Astro contact form component that posts to your unique Lucid Forms URL. It will write the component template, and Lucid Forms will handle the submission.
Your website is ready.
Connect your Astro contact form in 2 minutes.
No servers, no coding, no headaches. Join thousands of developers who use Lucid Forms.
✓ 10,000 submissions included