JSFiddle - React, Tailwind, and code Playground
HTML
<div class="img-wrapper">
<div class="status">
<div class="status-text">Текст на полоске</div>
</div>
</div>
CSS
.img-wrapper {
height: 200px;
width: 200px;
position: relative;
margin: 50px;
background: #ccc;
}
.status {
position: absolute;
background: red;
z-index: 5;
top: 30px;
left: -20px;
padding: 2px 0;
}
.status-text {
color: #fff;
padding: 10px 30px 10px 10px;
border: 1px solid #ffffff;
border-left: none;
border-right: none;
position: relative;
z-index: 5;
}
/*stripe trail*/
.status:after {
content: '';
position: absolute;
width: 0;
height: 0;
border: 22px solid transparent;
border-right: 22px solid #ccc;
top: 0;
right: 0;
z-index: 10;
}