JSFiddle - React, Tailwind, and code Playground
HTML
<div class="tab">Tab1
<div class="ribbon-wrapper-green"><div class="ribbon-green">NEW</div></div>
</div>
CSS
.tab, .tab-active {
float: left;
position: relative;
margin-top: 7px;
width: 120px;
height: 36px;
border: 2px solid #CCC;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
border-top: none;
border-bottom: none;
background-color: #DDD;
text-align: center;
margin-right: 4px;
}
/*Ribbon*/
.ribbon-wrapper-green {
width: 62px;
height: 36px;
overflow: hidden;
position: absolute;
top: -1px;
right: -3px;
}
.ribbon-green {
font: bold 9px Sans-Serif;
color: #333;
text-align: center;
text-shadow: rgba(255,255,255,0.5) 0px 1px 0px;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
position: relative;
padding: 3px 0;
left: -10px;
top: 5px;
width: 120px;
background-color: #BFDC7A;
background-image: -webkit-gradient(linear, left top, left bottom, from(#BFDC7A), to(#8EBF45));
background-image: -webkit-linear-gradient(top, #BFDC7A, #8EBF45);
background-image: -moz-linear-gradient(top, #BFDC7A, #8EBF45);
background-image: -ms-linear-gradient(top, #BFDC7A, #8EBF45);
background-image: -o-linear-gradient(top, #BFDC7A, #8EBF45);
color: #6a6340;
-webkit-box-shadow: 0px 0px 3px rgba(0,0,0,0.3);
-moz-box-shadow: 0px 0px 3px rgba(0,0,0,0.3);
box-shadow: 0px 0px 3px rgba(0,0,0,0.3);
}
.ribbon-green:before, .ribbon-green:after {
content: "";
border-top: 3px solid #6e8900;
border-left: 3px solid transparent;
border-right: 3px solid transparent;
position:absolute;
bottom: -3px;
}
.ribbon-green:before {
left: 0;
}
.ribbon-green:after {
right: 0;
}