Minimal Contact Form with CTA Focus

This minimal contact form focuses on a single strong call-to-action, ideal for lead capture on landing pages.

HTML

<form class="contact-cta">
  <h3>Get in Touch</h3>
  <p class="subtitle">We usually reply within 24 hours</p>

  <input type="email" placeholder="Your email" required>
  <textarea rows="3" placeholder="Your message" required></textarea>

  <button type="button">Send Message</button>
</form>

For production, change type="button" to type="submit" and connect your backend.

CSS

:root{
  --bg:#f8fafc;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --border:#e5e7eb;
  --primary:#2563eb;
  --primary-dark:#1d4ed8;
}

@media (prefers-color-scheme: dark){
  :root{
    --bg:#020617;
    --card:#020617;
    --text:#e5e7eb;
    --muted:#94a3b8;
    --border:#1f2937;
    --primary:#3b82f6;
    --primary-dark:#60a5fa;
  }
}

.contact-cta{
  max-width:400px;
  margin:80px auto;
  padding:32px;

  background:var(--card);
  border-radius:18px;
  border:1px solid var(--border);
  box-shadow:0 16px 40px rgba(0,0,0,.12);

  font-family:system-ui, -apple-system, sans-serif;
  color:var(--text);
  text-align:center;
}

.contact-cta h3{
  font-size:22px;
  margin-bottom:6px;
}

.contact-cta .subtitle{
  font-size:14px;
  color:var(--muted);
  margin-bottom:22px;
}

.contact-cta input,
.contact-cta textarea{
  width:100%;
  padding:14px 16px;
  margin-bottom:16px;

  border-radius:12px;
  border:1px solid var(--border);
  background:linear-gradient(180deg,var(--card),var(--bg));
  color:var(--text);
  font-size:15px;

  outline:none;
  resize:none;
  transition:border .2s ease, box-shadow .2s ease;
}

.contact-cta input::placeholder,
.contact-cta textarea::placeholder{
  color:var(--muted);
}

.contact-cta input:focus,
.contact-cta textarea:focus{
  border-color:var(--primary);
  box-shadow:0 0 0 4px rgba(37,99,235,.18);
}

.contact-cta button{
  width:100%;
  padding:15px;

  border:none;
  border-radius:999px;
  background:linear-gradient(
    135deg,
    var(--primary),
    var(--primary-dark)
  );

  color:#ffffff;
  font-size:16px;
  font-weight:600;
  cursor:pointer;

  transition:transform .15s ease, box-shadow .15s ease;
}

.contact-cta button:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 34px rgba(0,0,0,.22);
}

.contact-cta button:active{
  transform:translateY(0);
  box-shadow:none;
}

Notes

  • High-conversion layout
  • Low friction UX
  • Landing-page friendly

Preview styles shown. Production customization recommended.

Browse More UI Components

Explore hundreds of reusable HTML & CSS UI components built for modern web projects.
Discover buttons, cards, loaders, animations, layouts, and more all with live previews and clean, copy-paste code.

Leave a Reply

Your email address will not be published. Required fields are marked *