Bootstrap 5 Form Examples

Ruth Jul 09, 2026

Bootstrap, the popular CSS framework, has evolved significantly over the years, with version 5 being the latest iteration. One of the most notable improvements in Bootstrap 5 is the revamped form controls, which are not only more responsive but also offer a cleaner, more modern look. Let's delve into some Bootstrap 5 form examples to help you understand and implement these changes in your projects.

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

Before we dive into the examples, it's crucial to note that Bootstrap 5 has dropped support for jQuery. This means that all the JavaScript components, including forms, are now powered by plain JavaScript. Let's explore how this affects form functionality and appearance.

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

Form Layout and Sizing

Bootstrap 5 introduces a new grid system with improved responsiveness. This new system allows for more control over form layout, making it easier to create responsive forms that adapt to different screen sizes.

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

Bootstrap 5 also introduces a new input sizing system. You can now use the `form-control-lg` and `form-control-sm` classes to create larger or smaller form controls, respectively. This provides more flexibility in designing forms that cater to various user needs.

Horizontal Form

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

Horizontal forms are a great way to align labels and inputs, making your forms more readable and user-friendly. In Bootstrap 5, you can create horizontal forms using the `row` and `col` classes. Here's an example:

<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>

The `mb-3` class adds margin-bottom to the row, creating space between form groups. The `col-sm-2` class makes the label take up two columns on small screens and up, while the `col-sm-10` class makes the input take up the remaining ten columns.

Vertical Form

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

Vertical forms are the default form layout in Bootstrap 5. They are simple to create and work well on all screen sizes. Here's an example:

<div class="mb-3">
  <label for="exampleFormControlInput1" class="form-label">Email address</label>
  <input type="email" class="form-control" id="exampleFormControlInput1" placeholder="name@example.com">
</div>

The `mb-3` class adds margin-bottom to the form group, creating space between form controls. The `form-label` class is used for the label, and the `form-control` class is used for the input.

Form Validation

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

Bootstrap 5 introduces a new form validation system that is more intuitive and easier to use. It uses the `is-valid` and `is-invalid` classes to provide visual feedback to users. Here's an example:

<div class="mb-3">
  <label for="validationCustom01" class="form-label">First name</label>
  <input type="text" class="form-control" id="validationCustom01" required>
  <div class="valid-feedback">Looks good!</div>
  <div class="invalid-feedback">Please provide a valid first name.</div>
</div>

The `required` attribute is used to mark the input as required. The `valid-feedback` and `invalid-feedback` classes are used to provide feedback to the user when the input is valid or invalid, respectively.

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
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
Free 22+ HTML5 Signup & Registration Forms - HTML, CSS
Free 22+ HTML5 Signup & Registration Forms - HTML, CSS
37 Free Bootstrap Form Templates You Can Try Right Now
37 Free Bootstrap Form Templates You Can Try Right Now
Best Free Bootstrap Login Forms » CSS Author
Best Free Bootstrap Login Forms » CSS Author
Simple HTML Bootstrap Form Template
Simple HTML Bootstrap Form Template
Website Landing Page using HTML CSS Bootstrap 5 #3
Website Landing Page using HTML CSS Bootstrap 5 #3
Wizard
Wizard
Bootstrap 5 Modal Form
Bootstrap 5 Modal Form
A Beginner's Guide to the Latest Bootstrap 5 Utilities
A Beginner's Guide to the Latest Bootstrap 5 Utilities
Bootstrap Fieldset Legend: How To + Examples + Template | AZMIND
Bootstrap Fieldset Legend: How To + Examples + Template | AZMIND
40 Best Free Bootstrap Login Form Templates 2026 - Colorlib
40 Best Free Bootstrap Login Form Templates 2026 - Colorlib
Bootstrap Forms
Bootstrap Forms

In conclusion, Bootstrap 5's new form controls offer a cleaner, more modern look and improved responsiveness. With the new grid system, input sizing, and form validation system, creating responsive and user-friendly forms has never been easier. So, why not give these Bootstrap 5 form examples a try and see how they can enhance your projects? Happy coding!