Bootstrap snippet and html example. Alert boxes and icons bootstrap 5 bootdey

Bootstrap 5.1.3 snippet "Alert boxes and icons bootstrap 5 bootdey" with HTML, CSS, and JS. Copy, paste, and customize this responsive UI component for your project.

HTML code

Clean, semantic HTML that powers this Bootstrap 5.1.3 snippet. Copy and paste it into your page (with Bootstrap loaded) to reproduce the exact layout shown in the preview.

 <!-- created by @BrCodeSnippets -->
  <!-- https://www.codesnippets.dev.br/post/alert-boxes-customizados-com-icones-bootstrap-5 -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
  <div class="container mt-3 pt-3">
    <div class="row g-3">
      <div class="col-12 col-sm-6 col-lg-4">
        <div class="rounded-3 border-start border-4 border-primary alert-primary shadow h-100">
          <span class="bi bi-cart4 fs-1 m-4 float-start"></span>
          <div class="text-end p-4">
            <span class="d-block text-dark"> A simple text example</span>
            <span class="text-dark fs-3">Total 18.85</span>
          </div>
        </div>
      </div>

      <div class="col-12 col-sm-6 col-lg-4">
        <div class="rounded-3 border-start border-4 border-warning alert-warning shadow h-100">
          <span class="bi bi-columns-gap fs-1 m-4 float-start"></span>
          <div class="text-end p-4">
            <span class="d-block text-dark"> A simple text example</span>
            <span class="text-dark fs-3">Total 18.85</span>
          </div>
        </div>
      </div>

      <div class="col-12 col-sm-6 col-lg-4">
        <div class="rounded-3 border-start border-4 border-danger alert-danger shadow h-100">
          <span class="bi bi-people fs-1 m-4 float-start"></span>
          <div class="text-end p-4">
            <span class="d-block text-dark"> Customers</span>
            <span class="text-dark fs-3">Total 953</span>
          </div>
        </div>
      </div>

      <div class="col-12 col-sm-6 col-lg-4">
        <div class="rounded-3 border-start border-4 border-secondary alert-secondary shadow h-100">
          <span class="bi bi-chat fs-1 m-4 float-start"></span>
          <div class="text-end p-4">
            <span class="d-block text-dark"> Support</span>
            <span class="text-dark fs-3">Total 25</span>
          </div>
        </div>
      </div>

      <div class="col-12 col-sm-6 col-lg-4">
        <div class="rounded-3 border-start border-4 border-success alert-success shadow h-100">
          <span class="bi bi-wallet fs-1 m-4 float-start"></span>
          <div class="text-end p-4">
            <span class="d-block text-dark"> wallet</span>
            <span class="text-dark fs-3">Total 2000</span>
          </div>
        </div>
      </div>

      <div class="col-12 col-sm-6 col-lg-4">
        <div class="rounded-3 border-start border-4 border-info alert-info shadow h-100">
          <span class="bi bi-file-earmark fs-1 m-4 float-start"></span>
          <div class="text-end p-4">
            <span class="d-block text-dark"> A simple text reports</span>
            <span class="text-dark fs-3">Total 18.85</span>
          </div>
        </div>
      </div>

      <div class="col-12">
        <div class="rounded-3 border-start border-4 border-dark bg-dark shadow h-100">
          <span class="bi bi-heart fs-1 m-4 text-white float-start"></span>
          <div class="text-end p-4 text-white">
            <span class="d-block"> Favorited</span>
            <span class="fs-3">1000</span>
          </div>
        </div>
      </div>
    </div>
  </div>

CSS code

Scoped CSS that styles the component. Paste it after Bootstrap 5.1.3 to keep the design, spacing, and responsiveness consistent.

body{margin-top:20px;}

Similar snippets

Bootstrap example and template. Profile with tabs like facebook page

Profile with tabs like facebook page

Bootstrap example and template. Shop Product List

Shop Product List

Bootstrap example and template. documents list

documents list

Bootstrap example and template. Form register inside narrow jumbotron

Form register inside narrow jumbotron

Bootstrap example and template. bs5 dark footer

bs5 dark footer

Bootstrap example and template. Whatsapp Chat Box POPUP

Whatsapp Chat Box POPUP

Bootstrap example and template. cards with numbers

cards with numbers

Bootstrap example and template. bs4 types of timelines

bs4 types of timelines

FAQ

How do I use this snippet?

Include Bootstrap 5.1.3, paste the HTML, add the CSS block, and include the JS (if any) to mirror the live preview.

Can I use it in commercial projects?

Yes. It’s free for personal and commercial work; check the snippets license for details.

Is it responsive?

Yes. It inherits the responsive grid and components from Bootstrap 5.1.3.

Bootstrap example and template. Alert boxes and icons bootstrap 5 bootdey

About this bootstrap example/template

Optimized for copy‑paste: clean HTML, scoped CSS, and minimal JS so you can ship production‑ready UI faster and keep designs consistent.

Mobile‑first and responsive by default. Tested across modern browsers to reduce polish time on your project.

Already trusted in 523+ views. Reuse this snippet to speed up landing pages, dashboards, or onboarding flows.

Bootstrap 5.1.3

<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css'>

<script src='https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js'></script>

This code example is based on bootstrap 5.1.3 and the grid system of this framework

Responsive

Based on bootstrap framework makes all the layouts perfectly responsive for all devices

Crossbrowser compatibility

Tested on all major browsers, it works smoothly on all of them

semantic html 5

Built on html / css3 the code quality is really amazing

Simple Integration

This code example can be simply integrated on existing sites and new ones too, all you need to do is copy the code and start working