JSFiddle - React, Tailwind, and code Playground
HTML
<div class="triangle-with-shadow"></div>
CSS
.triangle-with-shadow {
width: 100px;
height: 100px;
position: relative;
overflow: hidden;
background: red;
}
.triangle-with-shadow:after {
content: "";
position: absolute;
width: 50px;
height: 50px;
background: #999;
transform: rotate(45deg); /* Prefixes... */
top: 75px;
left: 25px;
box-shadow: -1px -1px 10px -2px rgba(0, 0, 0, 0.5);
}