CHAPTER 07
Beginner
Bootstrap Buttons
Updated: May 18, 2026
5 min read
# CHAPTER 7
Bootstrap Buttons
1. Chapter Introduction
Bootstrap provides 8 color variants, solid and outline styles, 3 sizes, disabled/active states, and button groups — all with a single class combination. This chapter covers every button feature in Bootstrap 5.2. Learning Objectives
- Apply all 8 button color variants and outline styles.
- Control button sizes and states.
- Create button groups and full-width buttons.
- Add icons and loading spinners to buttons.
3. Button Variants
html
4. Sizes, States, and Full-Width
html
5. Button Groups
html
6. Buttons with Icons
html
7. Common Mistakes
-
Bootstrap 4's
.btn-blockdoes not exist in Bootstrap 5. Use<div class="d-grid">wrapper instead.
-
<a>used as button needsrole="button"for accessibility.
8. MCQs
Question 1
Large primary button?
Question 2
Bootstrap 5 full-width button?
Question 3
Outline primary button class?
Question 4
Disable a button?
Question 5
Button group role attribute?
Question 6
Loading spinner size for buttons?
Question 7
Radio toggle buttons require?
Question 8
Vertical button group?
Question 9
Number of built-in color variants?
Question 10
.btn-link creates?
9. Interview Questions
-
Q: Explain the difference between
.btn-primaryand.btn-outline-primary.
- Q: How do you create a block/full-width button in Bootstrap 5?
10. Summary
Bootstrap's button system handles every UI scenario. 8 solid variants, 8 outline variants, 3 sizes, disabled states, groups, and icon integration — all through simple class combinations. Thed-grid pattern for full-width buttons and btn-group for toolbars are the two most common patterns in production UIs.