Snippets Buttons

Bootstrap 5 Buy / Sell Signup Form with Radio Buttons

A signup card with a buy or sell segmented choice, floating-label fields and inline validation on a branded gradient background.

Bootstrap 5 No jQuery Apr 2020 2.5K views

<section class="wdw-stage wdw-aurora">
  <div class="container" style="max-width:520px">
    <div class="text-center mb-4">
      <h2 class="wdw-heading text-white mb-1">Hello and welcome</h2>
      <p class="mb-0 text-white-50">Let's create your account</p>
    </div>
    <form class="wdw-card text-body p-4 p-md-5" novalidate id="joinForm">
      <fieldset class="mb-4">
        <legend class="h6 fw-bold mb-3">What would you like to do?</legend>
        <div class="row g-2">
          <div class="col-6"><input type="radio" class="btn-check" name="role" id="roleSell" value="sell" checked><label class="btn btn-outline-primary rounded-pill w-100" for="roleSell">I want to sell</label></div>
          <div class="col-6"><input type="radio" class="btn-check" name="role" id="roleBuy" value="buy"><label class="btn btn-outline-primary rounded-pill w-100" for="roleBuy">I want to buy</label></div>
        </div>
      </fieldset>
      <div class="form-floating mb-3"><input type="text" class="form-control" id="jName" placeholder="Full name" autocomplete="name" required><label for="jName">Full name</label></div>
      <div class="form-floating mb-3" id="companyWrap"><input type="text" class="form-control" id="jCompany" placeholder="Company" autocomplete="organization"><label for="jCompany">Company name</label></div>
      <div class="form-floating mb-3"><input type="email" class="form-control" id="jEmail" placeholder="Email" autocomplete="email" required><label for="jEmail">Email address</label></div>
      <div class="form-floating mb-4"><input type="password" class="form-control" id="jPass" placeholder="Password" autocomplete="new-password" required minlength="8"><label for="jPass">Password (8+ characters)</label></div>
      <div class="d-flex flex-wrap align-items-center justify-content-between gap-3">
        <span class="small wdw-muted">Already a member? <a href="#">Sign in</a></span>
        <button class="btn btn-primary rounded-pill px-5" type="submit">Join</button>
      </div>
      <div class="alert alert-success mt-4 mb-0 py-2 small" id="joinOk" role="status" hidden></div>
    </form>
  </div>
</section>

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