.btn{
background: #fff;
border: 1px solid #ccc !important;
}
.btn div{
display: inline-block;
width:12px;
height:24px;
border-bottom-left-radius: 90px;
border-top-left-radius: 90px;
position:absolute;
}
.circle1{
background: red;
}
.circle2{
background: yellow;
}
.circle3{
background: #80ff80;
}
.circle4{
background: #008000;
}
.btnText{
padding-right:10px;
}
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
</head>
<body>
<button class="btn"><span class="btnText">High</span><div class="circle1"></div></button>
<button class="btn"><span class="btnText">Moderate</span><div class="circle2"></div></button>
<button class="btn"><span class="btnText">Low</span><div class="circle3"></div></button>
<button class="btn"><span class="btnText">No Risk</span><div class="circle4"></div></button>
</body>
</html>
**We can also achieve the same result like this...**
<style>
.btn{
background: #fff;
border: 1px solid #ccc;
}
.btn div{
display: inline-block;
width:12px;
height:24px;
border-bottom-left-radius: 8px;
border-top-left-radius: 8px;
position:absolute;
}
.circle1{
background: red;
}
.circle2{
background: yellow;
}
.circle3{
background: #80ff80;
}
.circle4{
background: #008000;
}
.btnText{
padding-right:10px;
}
</style>
<body>
<button class="btn"><span class="btnText">High</span><div class="circle1"></div></button>
<button class="btn"><span class="btnText">Moderate</span><div class="circle2"></div></button>
<button class="btn"><span class="btnText">Low</span><div class="circle3"></div></button>
<button class="btn"><span class="btnText">No Risk</span><div class="circle4"></div></button>
</body>