JSFiddle - React, Tailwind, and code Playground
HTML
<div class="like" data-count="12">❤</div>
CSS
body {
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
margin: 0;
background-color: #000;
}
.like {
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: 100px;
height: 100px;
border: 1px solid gray;
color: white;
font: normal normal 32px / 1.1 serif;
text-align: center;
}
.like:after {
content: attr(data-count);
position: absolute;
top: -15px;
right: -15px;
display: flex;
align-items: center;
justify-content: center;
min-width: 24px;
height: 30px;
padding: 0 3px;
color: white;
font-size: 18px;
background-color: tomato;
border: 6px solid black;
border-radius: 50%;
}