Bootstrap 5 Form Layout Examples

Ruth Jul 09, 2026

Bootstrap, the popular CSS framework, has evolved significantly with its fifth iteration, bringing a plethora of new features and improvements, especially in form layout. With Bootstrap 5, creating responsive and visually appealing forms has become even more intuitive and efficient. Let's delve into some practical examples of Bootstrap 5 form layouts.

Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5

Before we dive into the examples, it's crucial to understand that Bootstrap 5 uses a flexbox-based design system, which provides more control and flexibility in creating form layouts. It also introduces a new input group feature that enhances the form's visual hierarchy and usability.

the homepage for an employee portal with a rocket ship in the background and text that reads, apply as a employee
the homepage for an employee portal with a rocket ship in the background and text that reads, apply as a employee

Form Layout Basics

Bootstrap 5 provides a range of utility classes to help you create responsive form layouts. The most fundamental classes are .form-control for inputs, .form-select for select elements, and .form-range for input sliders.

Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5

To create a basic form, wrap your form elements within a .form class or a .row for more complex layouts. Use the appropriate column classes, such as .col-md-6 or .col-lg-4, to create responsive columns.

Horizontal Form

Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5

A horizontal form arranges labels and form controls on the same line, making it perfect for forms with many fields. In Bootstrap 5, you can create a horizontal form by adding the .row and .col classes to your form elements.

Here's an example of a horizontal form with Bootstrap 5:

<div class="row mb-3">
  <label for="inputEmail3" class="col-sm-2 col-form-label">Email</label>
  <div class="col-sm-10">
    <input type="email" class="form-control" id="inputEmail3">
  </div>
</div>
<div class="row mb-3">
  <label for="inputPassword3" class="col-sm-2 col-form-label">Password</label>
  <div class="col-sm-10">
    <input type="password" class="form-control" id="inputPassword3">
  </div>
</div>

Vertical Form

Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5

Vertical forms stack form controls vertically, making them ideal for forms with fewer fields. Bootstrap 5's default form layout is vertical, so you don't need any additional classes to create one.

Here's an example of a vertical form:

<form>
  <div class="mb-3">
    <label for="exampleInputEmail1" class="form-label">Email address</label>
    <input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp">
    <div id="emailHelp" class="form-text">We'll never share your email with anyone else.</div>
  </div>
  <div class="mb-3">
    <label for="exampleInputPassword1" class="form-label">Password</label>
    <input type="password" class="form-control" id="exampleInputPassword1">
  </div>
  <button type="submit" class="btn btn-primary">Submit</button>
</form>

Input Groups

Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5

Input groups help create a visual hierarchy and improve usability by grouping related form elements. Bootstrap 5 introduces new input group features, such as text, prepended, and appended inputs, as well as custom forms with checkboxes and radio buttons.

Here's an example of an input group with text and prepended inputs:

Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
HTML Form Validation with Bootstrap
HTML Form Validation with Bootstrap
Website Landing Page using HTML CSS Bootstrap 5 #3
Website Landing Page using HTML CSS Bootstrap 5 #3
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
Bootstrap Tutorial | Bootstrap Notes | Bootstrap 5
37 Free Bootstrap Form Templates You Can Try Right Now
37 Free Bootstrap Form Templates You Can Try Right Now
Free 22+ HTML5 Signup & Registration Forms - HTML, CSS
Free 22+ HTML5 Signup & Registration Forms - HTML, CSS
Best Free Bootstrap Login Forms » CSS Author
Best Free Bootstrap Login Forms » CSS Author
AdminKit PRO - Bootstrap 5 Admin Template
AdminKit PRO - Bootstrap 5 Admin Template
40+ Best Free Bootstrap Templates & Themes in 2026 — Speckyboy
40+ Best Free Bootstrap Templates & Themes in 2026 — Speckyboy
Product Landing Page Template Free Source Code (HTML, CSS, Bootstrap 5)
Product Landing Page Template Free Source Code (HTML, CSS, Bootstrap 5)
Bootstrap 5 Login Form Template
Bootstrap 5 Login Form Template
Bootstrap 5 popup form
Bootstrap 5 popup form
Bootstrap Fieldset Legend: How To + Examples + Template | AZMIND
Bootstrap Fieldset Legend: How To + Examples + Template | AZMIND
the screens are showing different types of webpages, including one for each user
the screens are showing different types of webpages, including one for each user

<div class="input-group mb-3">
  <span class="input-group-text">@</span>
  <input type="text" class="form-control" placeholder="Username">
</div>
<div class="input-group mb-3">
  <input type="text" class="form-control" placeholder="Recipient's username">
  <span class="input-group-text">@example.com</span>
</div>

Custom Forms

Bootstrap 5 also introduces custom forms for checkboxes and radio buttons, allowing you to create more visually appealing and consistent form elements.

Here's an example of custom form checkboxes and radio buttons:

<div class="form-check">
  <input class="form-check-input" type="checkbox" value="" id="flexCheckDefault">
  <label class="form-check-label" for="flexCheckDefault">Default checkbox</label>
</div>
<div class="form-check">
  <input class="form-check-input" type="radio" name="flexRadioDefault" id="flexRadioDefault1">
  <label class="form-check-label" for="flexRadioDefault1">Default radio</label>
</div>

In conclusion, Bootstrap 5's form layout features offer a wealth of possibilities for creating responsive and visually appealing forms. By utilizing the new input groups, custom forms, and utility classes, you can build forms that not only look great but also provide an excellent user experience. So, start exploring these features and elevate your web development game with Bootstrap 5.