🚀 ASTRO FRAMEWORK INTEGRATION
Fast Form Handling for Static Astro Sites
Maintain a 100/100 Lighthouse performance score. Add zero-JS serverless form processing to Astro without setting up SSR adapters or backend functions.
🚀
src/components/ContactForm.astro (Zero-JS Static Form)
---
// src/components/ContactForm.astro
// Zero client JavaScript required - 100% static HTML & CSS!
---
<form
action="https://forms.sounny.com/f/YOUR_EMAIL@DOMAIN.COM"
method="POST"
class="contact-form"
>
<!-- Optional redirect URL after submission -->
<input type="hidden" name="_next" value="https://yourdomain.com/thanks" />
<div class="form-group">
<label for="name">Your Name</label>
<input type="text" id="name" name="name" required placeholder="Jane Doe" />
</div>
<div class="form-group">
<label for="email">Your Email</label>
<input type="email" id="email" name="email" required placeholder="jane@example.com" />
</div>
<div class="form-group">
<label for="message">Project Details</label>
<textarea id="message" name="message" rows="4" required></textarea>
</div>
<button type="submit" class="submit-btn">Send Message</button>
</form>
<style>
.contact-form {
display: flex;
flex-direction: column;
gap: 1.25rem;
max-width: 480px;
margin: 0 auto;
}
.form-group label {
display: block;
font-weight: 600;
margin-bottom: 0.35rem;
color: #1e293b;
font-size: 14px;
}
.form-group input, .form-group textarea {
width: 100%;
padding: 0.65rem 0.85rem;
border-radius: 8px;
border: 1px solid #cbd5e1;
font-family: inherit;
}
.submit-btn {
background: #ff4d00;
color: #ffffff;
font-weight: 700;
padding: 0.85rem 1.5rem;
border-radius: 8px;
border: none;
cursor: pointer;
transition: background 0.2s;
}
.submit-btn:hover {
background: #e04400;
}
</style>
Zero Hydration Cost
Keep your Astro site completely static. Forms submit through standard HTML POST without downloading megabytes of client React bundles.
Spam Honeypots Included
SounnyForms validates submissions server-side with invisible honeypot algorithms and timestamp analysis.
1-Click Inbox Response
Inquiries arrive in your inbox with the sender set as the Reply-To address. Hit Reply to close deals instantly.