Bootstrap 5 provides buttons with different styles.
Example
Button classes can be used on <a>, <button>, or <input> elements:
Example
Link ButtonButton Outline
Bootstrap 5 also provides buttons with an outline, with a hover effect:
Example
Button Sizes
Bootstrap 5 allows you to change the size of a button, with .btn-lg for large buttons and .btn-sm for small buttons:
Example
Block Level Buttons
Block level buttons can be created by adding the .btn-block class. The .d-grid class is applied to the parent element:
Example
If you have multiple block level buttons, you can use the .gap-* class to set the spacing:
Example
Active and Disabled Buttons
Buttons can be set to an active or disabled state.
The .active class makes a button appear clickable, while the disabled attribute makes a button unclickable. Note that the <a> element does not support the disabled attribute, but you can add the .disabled class to disable the link.
Example
Disabled LinkLoading Buttons
We can also create a loading button.
YouTip