</> ConvertAtlas Developer Tools
Bootstrap 5 · Intermediate

KPI Card with Tooltip

A KPI card with an info tooltip and a mini bar chart.

Requires Bootstrap 5, Tippy.js, ApexCharts. Add the CDN tags below to your page (styles in <head>, scripts before </body>). The downloaded file already includes them.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://unpkg.com/@popperjs/core@2"></script>
<script src="https://unpkg.com/tippy.js@6"></script>
<script src="https://cdn.jsdelivr.net/npm/apexcharts@3.49.1/dist/apexcharts.min.js"></script>
<div class="card border-0 shadow-sm" style="width:360px;max-width:100%"><div class="card-body">
  <div class="d-flex justify-content-between"><h6 class="fw-bold mb-0">Conversion <span id="kpInfo" style="cursor:help">ⓘ</span></h6><span class="badge text-bg-success">+4.2%</span></div>
  <div id="kpChart"></div>
</div></div>
tippy('#kpInfo',{content:'Percentage of visitors who completed a purchase.',animation:'scale'});
new ApexCharts(document.getElementById('kpChart'),{chart:{type:'bar',height:140,toolbar:{show:false}},series:[{data:[3.1,3.6,3.4,4.0,4.2]}],colors:['#16a34a'],plotOptions:{bar:{borderRadius:4,columnWidth:'50%'}},dataLabels:{enabled:false},xaxis:{categories:['M','T','W','T','F']}}).render();
Free to use.This component uses Bootstrap 5, Tippy.js, ApexCharts (linked above). Copy any file, or download a ready-to-open .html page with the CDN links already included.