JSFiddle - React, Tailwind, and code Playground
by web tiki
HTML
<div>Some Text</div>
CSS
div{
height:40px;
background:red;
color:#fff;
position:relative;
width:200px;
text-align:center;
line-height:40px;
}
div:after{
content:"";
position:absolute;
height:0;
width:0;
left:100%;
top:0;
border:20px dotted transparent;
border-left: 20px dotted red;
}