Bootstrap 5 buttons are the most used interactive component in web interfaces. This page covers 5 button patterns — all variants, outline, sizes, states and custom styles — each ready to copy directly.
Quick Setup
Buttons need only Bootstrap 5 CSS:
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"/>
Key Classes Reference
| Class | What It Does |
|---|---|
.btn | Required base class for all buttons |
.btn-primary | Blue filled button |
.btn-danger | Red filled button |
.btn-success | Green filled button |
.btn-outline-primary | Blue outline button |
.btn-sm | Small button size |
.btn-lg | Large button size |
.btn-link | Looks like a link |
.d-block.w-100 | Full width button |
.active | Active/pressed state |
disabled | Disabled state attribute |
1. Bootstrap 5 Button Variants
All Bootstrap 5 button color variants — primary, secondary, success, danger, warning, info, light and dark.
2. Bootstrap 5 Outline Buttons
Transparent background buttons with colored borders using btn-outline-* variants.
3. Bootstrap 5 Button Sizes
Buttons in small, default and large sizes using btn-sm and btn-lg. Use d-block w-100 for full width.
4. Bootstrap 5 Button States
Active, disabled and loading button states. Use disabled attribute or aria-disabled for accessibility.
5. Bootstrap 5 Custom Styled Buttons
Buttons with custom colors, gradients, rounded corners and hover effects using CSS.
Frequently Asked Questions
Need a Full Bootstrap 5 Admin Dashboard?
Get a complete Angular 21 + Bootstrap 5 dashboard with 50+ components — built by the same team behind BootstrapPlanet.
Browse Templates →Use code FIRST30 for 30% off your first purchase.