Circular Buttons in Bootstrap 4 

Circular buttons are a popular UI element used in modern web design to enhance interactivity and visual appeal. In this guide, we will explore how to create circular buttons in Bootstrap 4, customize them, and apply them in real-world projects. This tutorial is ideal for beginners and intermediate developers looking to enhance their Bootstrap button styles.

What Are Circular Buttons?

Circular buttons are buttons with a perfectly round shape, usually achieved by combining Bootstrap's built-in button classes with custom CSS. These buttons are often used for icons, social media links, and action buttons because of their unique and attractive design.

Benefits of Circular Buttons

  • Improves user interface aesthetics.
  • Highlights key actions like "Submit" or "Add to Cart."
  • Works well for icons and social media buttons.
  • Responsive and easy to integrate with Bootstrap 4.
  • Improves user interface aesthetics by giving buttons a modern and visually appealing look.
  • Highlights key actions like "Submit" or "Add to Cart."
  • Works well for icons and social media buttons.
  • Responsive and easy to integrate with Bootstrap 4.

Creating Circular Buttons in Bootstrap 4

The simplest way to create a circular button is by using Bootstrap's btn class along with custom CSS for rounding the corners.

Basic Circular Button Example

<button class="btn btn-primary btn-circle">A</button>

Here, btn-primary is the Bootstrap 4 color class, and btn-circle is a custom class that we'll define to make the button round.

CSS for Circular Buttons

.btn-circle { width: 50px; height: 50px; border-radius: 50%; padding: 0; text-align: center; font-size: 18px; line-height: 50px; }

Explanation:

  • width & height: Equal values to create a perfect circle.
  • border-radius: 50% makes the shape circular.
  • line-height: Centers the text or icon vertically.
  • padding: Set to 0 to maintain circular shape.

Adding Icons to Circular Buttons

Using icons inside circular buttons is common for enhancing UX. Font Awesome or Bootstrap icons are frequently used.

<button class="btn btn-success btn-circle"> <i class="fas fa-check"></i> </button>

Here, fa-check is a Font Awesome icon class. This method is great for action buttons like "Submit," "Confirm," or "Next."

Different Sizes of Circular Buttons

You can create small, medium, and large circular buttons by adjusting the width, height, and line-height values:

Size Width & Height CSS Class Example
Small 40px .btn-circle-sm
Medium 50px .btn-circle
Large 60px .btn-circle-lg

 Use Cases of Circular Buttons

  • Social Media Links: Round buttons for Facebook, Twitter, Instagram.
  • Form Submission: Eye-catching circular submit buttons.
  • Navigation Buttons: Circular next/previous arrows in carousels.
  • Floating Action Buttons (FAB): Popular in mobile web applications.

Advanced Customization for Circular Buttons

Hover Effects

.btn-circle:hover { background-color: #0056b3; color: #fff; transform: scale(1.1); transition: 0.3s; }

This code adds a subtle scaling effect when hovering over the button, enhancing user interaction.

Outline Circular Buttons

<button class="btn btn-outline-danger btn-circle"> <i class="fas fa-trash"></i> </button>

Outline circular buttons are perfect for destructive actions like "Delete" or "Remove" because they visually differentiate from primary buttons.

Tips for Using Circular Buttons in Bootstrap 4

  • Always maintain equal width and height for perfect circles.
  • Use icons instead of text for smaller buttons.
  • Combine with Bootstrap 4 utilities like m-2 or p-2 for spacing.
  • Test responsiveness on different screen sizes.
  • Use meaningful colors based on the button action.


Circular buttons in Bootstrap 4 are a simple yet powerful way to enhance your website’s UI. By using Bootstrap button classes along with custom CSS, you can create attractive, interactive buttons suitable for forms, navigation, social media, and more. With icons, hover effects, and size variations, these buttons are highly versatile for both web and mobile interfaces.

FAQs About Circular Buttons in Bootstrap 4

1. How do I make a perfectly circular button in Bootstrap 4?

Use equal width and height values along with border-radius: 50% in a custom CSS class. Example: .btn-circle { width: 50px; height: 50px; border-radius: 50%; }

2. Can I add icons inside circular buttons?

Yes, you can use Font Awesome or Bootstrap icons inside circular buttons for better UX. Make sure the icon size fits the button dimensions.

3. How do I create different sizes of circular buttons?

Create separate classes like .btn-circle-sm, .btn-circle, and .btn-circle-lg with varying width, height, and line-height values.

4. Are circular buttons mobile-friendly?

Yes, as long as the buttons are sized appropriately and responsive using Bootstrap 4 utilities like m-2 for spacing. Test on multiple devices to ensure usability.

5. How can I add hover effects to circular buttons?

Use CSS :hover selector to apply color changes, scale transformations, or shadow effects. Example: .btn-circle:hover { transform: scale(1.1); }

line

Copyrights © 2024 letsupdateskills All rights reserved