Nearby lessons
37 of 39π BS5 Input Groups
π What Are Bootstrap 5 Input Groups?
Input groups attach add-ons (text, buttons) to an input. Use .input-group as the wrapper, .input-group-text for add-ons, and .form-control for the input. Place add-ons before or after the input.
π Basic Input Group (.input-group, .input-group-text)
.input-group β flex container that groups the input and add-ons. .input-group-text β styles a span or div as an add-on (e.g. "@", "$"). Put .form-control next to it.
β Input Group Best Practices
- Use .input-group-text for static text add-ons.
- Use .form-control for the actual input.
- Add aria-label on the input when the label is visual only.
π§ Test Your Knowledge
2 QuestionsProgress: 0 / 2
Keep Going!BS5 Floating Labels