Snippets Contact form

Bootstrap 5 Contact Form with Info Panel

A split contact section with a brand panel listing email, phone and address beside a floating-label form with subject select and message box.

Bootstrap 5 No jQuery May 2019 2.7K views

<section class="wdw-stage">
  <div class="container" style="max-width: 1000px;">
    <div class="wdw-card overflow-hidden">
      <div class="row g-0">
        <div class="col-lg-5 wdw-aurora p-4 p-md-5 d-flex flex-column justify-content-between gap-5">
          <div>
            <span class="wdw-eyebrow text-white opacity-75">Contact us</span>
            <h1 class="h2 fw-bold mt-1 mb-2">Let's talk about your project</h1>
            <p class="opacity-75 mb-0">Feel free to reach out. We usually reply within one business day.</p>
          </div>
          <ul class="list-unstyled d-grid gap-3 mb-0">
            <li class="d-flex align-items-center gap-3"><span class="ct-ico"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3 7l9 6 9-6"/></svg></span>[email protected]</li>
            <li class="d-flex align-items-center gap-3"><span class="ct-ico"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1 1 .4 1.9.7 2.8a2 2 0 0 1-.5 2.1L8.1 9.9a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.8.7a2 2 0 0 1 1.7 2z"/></svg></span>+1 (555) 014-2290</li>
            <li class="d-flex align-items-center gap-3"><span class="ct-ico"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 21s7-6.2 7-11a7 7 0 0 0-14 0c0 4.8 7 11 7 11z"/><circle cx="12" cy="10" r="2.5"/></svg></span>221 Market Street, San Francisco</li>
          </ul>
        </div>
        <div class="col-lg-7 p-4 p-md-5">
          <form class="row g-3" id="contactForm" novalidate>
            <div class="col-sm-6"><div class="form-floating"><input type="text" class="form-control" id="ctName" placeholder="Name" autocomplete="name" required><label for="ctName">Name</label><div class="invalid-feedback">Please tell us your name.</div></div></div>
            <div class="col-sm-6"><div class="form-floating"><input type="email" class="form-control" id="ctEmail" placeholder="Email" autocomplete="email" required><label for="ctEmail">Email address</label><div class="invalid-feedback">Enter a valid email.</div></div></div>
            <div class="col-12"><div class="form-floating"><select class="form-select" id="ctSubject" required>
              <option value="" selected disabled>Choose one</option>
              <option>General customer service</option><option>Suggestions</option><option>Product support</option>
            </select><label for="ctSubject">Subject</label><div class="invalid-feedback">Pick a subject.</div></div></div>
            <div class="col-12"><div class="form-floating"><textarea class="form-control ct-area" id="ctMessage" placeholder="Message" required></textarea><label for="ctMessage">Message</label><div class="invalid-feedback">Write us a short message.</div></div></div>
            <div class="col-12 d-flex align-items-center justify-content-between gap-3 flex-wrap">
              <span class="small wdw-muted" id="ctNote" role="status"></span>
              <button type="submit" class="btn btn-primary rounded-pill px-4">Send message
                <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M22 2L11 13M22 2l-7 20-4-9-9-4z"/></svg>
              </button>
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</section>

Built on Bootstrap 5.3.8 with plain JavaScript — no jQuery. Supports light and dark mode via data-bs-theme.

Free to use in personal and commercial projects under the MIT license.