iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
These 25 Bootstrap button examples cover solid and outline styles, hover effects, icon controls, social links, and responsive groups. They target Bootstrap 5.3; add Bootstrap’s CSS to your page, then use the matching HTML and CSS below. The examples are starting points, not browser-tested or accessibility-audited components.
Set up Bootstrap 5.3
Include Bootstrap 5.3’s stylesheet before your custom styles. Static button styling needs CSS; the examples below do not require Bootstrap JavaScript. Toggle controls that change state are a separate case and are covered later.
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
Bootstrap’s .btn class is the foundation for button variants. Use it with a variant such as .btn-primary, or define a custom appearance. Bootstrap 5.3 notes that if you use .btn alone, you should provide explicit focus styling. The examples with custom hover effects below also define keyboard focus feedback.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Solid and outline button styles
Use a native <button> for an action and an <a> for navigation. Set the button’s type explicitly: type="button" for a control that does not submit a form, or type="submit" when it should submit one.
#1 Best Overall
- KEYBOARD: The keyboard works for Windows with hot keys that enable easy access to Media, My Computer, Mute, Volume up/down, and Calculator
- EASY SETUP: Experience simple installation with the USB wired connection
- VERSATILE COMPATIBILITY: This keyboard is designed to work with multiple Windows versions, including Vista, 7, 8, 10 offering broad compatibility across devices.
- SLEEK DESIGN: The elegant black color of the wired keyboard complements your tech and decor, adding a stylish and cohesive look to any setup without sacrificing function.
- FULL-SIZED CONVENIENCE: The standard QWERTY layout of this keyboard set offers a familiar typing experience, ideal for both professional tasks and personal use.
-
Primary action
<button type="button" class="btn btn-primary">Save changes</button> -
Secondary action
<button type="button" class="btn btn-secondary">Cancel</button> -
Success state or confirmation
<button type="button" class="btn btn-success">Approve request</button> -
Destructive action
<button type="button" class="btn btn-danger">Delete draft</button> -
Warning action
<button type="button" class="btn btn-warning">Review settings</button> -
Informational action
<button type="button" class="btn btn-info">View details</button> -
Light variant
<button type="button" class="btn btn-light">Open panel</button> -
Dark variant
<button type="button" class="btn btn-dark">Manage account</button> -
Outline primary
<button type="button" class="btn btn-outline-primary">Add item</button> -
Outline danger
<button type="button" class="btn btn-outline-danger">Remove item</button>
Bootstrap’s visual variants do not explain an action by themselves. Give each control a descriptive label; color alone does not communicate meaning to people using screen readers. Check the actual text and background contrast in your finished design. In particular, Bootstrap’s v5.2 documentation cautions that some light foreground colors need a dark background for sufficient contrast; do not assume an outline or light style is legible on every surface. See the Bootstrap 5.3 button documentation and Bootstrap 5.2 button documentation.
Buttons with hover and focus effects
These examples use one shared custom style family. Add the CSS once, then use its classes with Bootstrap’s .btn. Hover styling is not a substitute for keyboard feedback: :focus-visible makes focus clear for keyboard users, while touch users may never see hover.
Rank #2
- Reliable Plug and Play: The USB receiver provides a reliable wireless connection up to 33 ft (1), so you can forget about drop-outs and delays and you can take it wherever you use your computer
- Type in Comfort: The design of this keyboard creates a comfortable typing experience thanks to the low-profile, quiet keys and standard layout with full-size F-keys, number pad, and arrow keys
- Durable and Resilient: This full-size wireless keyboard features a spill-resistant design (2), durable keys and sturdy tilt legs with adjustable height
- Long Battery Life: MK270 combo features a 36-month keyboard and 12-month mouse battery life (3), along with on/off switches allowing you to go months without the hassle of changing batteries
- Easy to Use: This wireless keyboard and mouse combo features 8 multimedia hotkeys for instant access to the Internet, email, play/pause, and volume so you can easily check out your favorite sites
.btn-lift {
transition: transform .18s ease, box-shadow .18s ease;
}
.btn-lift:hover {
transform: translateY(-2px);
box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
}
.btn-lift:focus-visible {
outline: 3px solid currentColor;
outline-offset: 3px;
}
.btn-fill {
color: #0d6efd;
background: transparent;
border: 1px solid #0d6efd;
transition: color .18s ease, background-color .18s ease;
}
.btn-fill:hover {
color: #fff;
background: #0d6efd;
}
.btn-fill:focus-visible {
outline: 3px solid #0d6efd;
outline-offset: 3px;
}
.btn-pill-custom {
border-radius: 999px;
transition: filter .18s ease, box-shadow .18s ease;
}
.btn-pill-custom:hover { filter: brightness(.9); }
.btn-pill-custom:focus-visible {
outline: 3px solid currentColor;
outline-offset: 3px;
}
.btn-shadow-custom {
box-shadow: 0 .25rem .5rem rgba(13, 110, 253, .25);
transition: box-shadow .18s ease;
}
.btn-shadow-custom:hover {
box-shadow: 0 .5rem 1rem rgba(13, 110, 253, .35);
}
.btn-shadow-custom:focus-visible {
outline: 3px solid #0d6efd;
outline-offset: 3px;
}
-
Lift on hover
<button type="button" class="btn btn-primary btn-lift">Explore features</button> -
Fill on hover
<button type="button" class="btn btn-fill">Show more</button> -
Rounded pill
<button type="button" class="btn btn-success btn-pill-custom">Get started</button> -
Shadow emphasis
<button type="button" class="btn btn-primary btn-shadow-custom">Continue</button>
Keep movement subtle and consider users who prefer reduced motion. You can disable the transitions in the shared CSS with a @media (prefers-reduced-motion: reduce) rule. Bootstrap distinguishes hover, focus, active, and disabled states; verify each state against your chosen colors rather than treating them as interchangeable.
Icon-plus-label buttons
Bootstrap Icons is an official open-source SVG icon library. Add its stylesheet from the Bootstrap Icons site if you want to use the icon font classes below. These icons are decorative because the accompanying visible label states the action, so mark each icon aria-hidden="true".
Rank #3
- All-day Comfort: The design of this standard keyboard creates a comfortable typing experience thanks to the deep-profile keys and full-size standard layout with F-keys and number pad
- Easy to Set-up and Use: Set-up couldn't be easier, you simply plug in this corded keyboard via USB on your desktop or laptop and start using right away without any software installation
- Compatibility: This full-size keyboard is compatible with Windows 7, 8, 10 or later, plus it's a reliable and durable partner for your desk at home, or at work
- Spill-proof: This durable keyboard features a spill-resistant design (1), anti-fade keys and sturdy tilt legs with adjustable height, meaning this keyboard is built to last
- Plastic parts in K120 include 51% certified post-consumer recycled plastic*
-
Download
<button type="button" class="btn btn-primary"> <i class="bi bi-download" aria-hidden="true"></i> Download file </button> -
Search
<button type="button" class="btn btn-outline-secondary"> <i class="bi bi-search" aria-hidden="true"></i> Search </button> -
Add item
<button type="button" class="btn btn-success"> <i class="bi bi-plus-lg" aria-hidden="true"></i> Add item </button> -
Send message
<button type="button" class="btn btn-primary"> <i class="bi bi-send" aria-hidden="true"></i> Send message </button>
Icon-only controls
Without visible text, an icon-only button needs an accessible name that describes its action. Use a concise aria-label; a logo or hover-only tooltip is not enough. Make sure the icon font is loaded and that the control remains identifiable if it fails to render.
-
Close
<button type="button" class="btn btn-outline-secondary" aria-label="Close"> <i class="bi bi-x-lg" aria-hidden="true"></i> </button> -
Open search
<button type="button" class="btn btn-outline-primary" aria-label="Open search"> <i class="bi bi-search" aria-hidden="true"></i> </button> -
More options
<button type="button" class="btn btn-secondary" aria-label="More options"> <i class="bi bi-three-dots" aria-hidden="true"></i> </button>
Social buttons for profile links
Social-branded controls are usually navigation, so use links with real destination URLs, not form buttons. This example uses plain text labels instead of brand logos; replace each destination with the correct profile address and use brand colors only after checking text contrast.
Rank #4
- 【Dreamy Rainbow Gaming Keyboard】K521 Gaming Keyboard Adopts a Different LED Backlight Design, Upgraded on the Traditional LED Backlight Effect, Making the Light More Penetrating, Giving You a More Dazzling Visual Effect, Making Your Gaming Process More Enjoyable
- 【One Touch Opens & Visual Feast】The K521 Red Dragon Keyboard has a One-Touch on/off Lighting Button for Added Convenience. It also has a Three-Position Adjustable Breathing Mode and a Four-Position Adjustable Brightness Lighting Mode
- 【Mechanical Feeling & Fast Tapping】The PC Keyboard Keys are Designed for Mechanical Feeling, Giving You a Better Feel During Use and the Ability to Trigger Keys Quickly, Allowing You to Win All Your Games
- 【19 Keys Anti-Ghosting Keyboard】Anti-Ghosting Ensures Every Button Can Be Triggered. This Allows You to Trigger Key Combinations In The Game Accurately, And Each Skill Can Be Accurately Released to Increase Your Winning Rate. Redragon K521 Will Be Your Perfect Partner
- 【12 Multimedia Combination Keys】The K521 Wired Gaming Keyboard is Equipped with 12 Multimedia Keys That Can Greatly Enhance Your Gaming/Office Efficiency and Make It More Convenient to Use
-
Facebook profile
<a class="btn btn-primary" href="https://www.facebook.com/">Visit us on Facebook</a> -
Instagram profile
<a class="btn btn-danger" href="https://www.instagram.com/">Visit us on Instagram</a> -
LinkedIn profile
<a class="btn btn-dark" href="https://www.linkedin.com/">Visit us on LinkedIn</a>
Responsive and grouped button layouts
For side-by-side actions, Bootstrap’s button group keeps related controls together. On narrow screens, let the surrounding layout wrap so the controls do not overflow.
-
Grouped actions
<div class="btn-group" role="group" aria-label="Document actions"> <button type="button" class="btn btn-outline-primary">Preview</button> <button type="button" class="btn btn-outline-primary">Edit</button> <button type="button" class="btn btn-primary">Publish</button> </div> -
Wrapping action row
<div class="d-flex flex-wrap gap-2"> <button type="button" class="btn btn-primary">Save</button> <button type="button" class="btn btn-outline-secondary">Save and close</button> <button type="button" class="btn btn-link">Cancel</button> </div> -
Link-style action
<button type="button" class="btn btn-link">Reset filters</button>
Disabled states and toggle behavior
Disabled controls should not look actionable. Bootstrap 5.3 suppresses hover and active pointer behavior for disabled buttons. For a native button, use the disabled attribute; for a link that is unavailable, remove or guard its destination, apply aria-disabled="true", and provide styling that makes its state apparent.
Best Value
- All-day Comfort: This USB keyboard creates a comfortable and familiar typing experience thanks to the deep-profile keys and standard full-size layout with all F-keys, number pad and arrow keys
- Built to Last: The spill-proof (2) design and durable print characters keep you on track for years to come despite any on-the-job mishaps; it’s a reliable partner for your desk at home, or at work
- Long-lasting Battery Life: A 24-month battery life (4) means you can go for 2 years without the hassle of changing batteries of your wireless full-size keyboard
- Simply plug the USB receiver into a USB port on your desktop, laptop or netbook computer and start using the keyboard right away without any software installation
- Simply Wireless: Forget about drop-outs and delays thanks to a strong, reliable wireless connection with up to 33 ft range (5); K270 is compatible with Windows 7, 8, 10 or later
<button type="button" class="btn btn-primary" disabled>Saving…</button>
<a class="btn btn-secondary disabled" href="#" aria-disabled="true">Unavailable</a>
A visual button that toggles a state needs behavior in addition to CSS. Bootstrap’s button plugin supports toggle behavior; static examples in this gallery do not implement it. Consult the Bootstrap 5.3 button documentation for the version-specific plugin patterns. For CDN setup and notes about JavaScript and Popper for other Bootstrap components, see Bootstrap 5.2’s getting-started guide. The legacy Bootstrap CSS reference also recommends native buttons where possible; because it documents an older version, check markup against the version you ship.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

