JSFiddle - React, Tailwind, and code Playground

HTML

<div>test</div>

CSS

div {
    position: relative;
    width: 90px;
    padding: 5px;
    background: yellow;
}

div:before {
    content: '';
    display: block;
    position: absolute;
    top: 5px;
    bottom: -5px;
    right: -10px;
    width: 10px;
    background: grey;
    
    transform: skew(0, 45deg);
    -webkit-transform: skew(0, 45deg);
    -moz-transform: skew(0, 45deg);
    -o-transform: skew(0, 45deg);
    -ms-transform: skew(0, 45deg);
}

div:after {
    content: '';
    display: block;
    position: absolute;
    bottom: -10px;
    left: 5px;
    right: -5px;
    height: 10px;
    background: black;
    
    transform: skew(45deg, 0);
    -webkit-transform: skew(45deg, 0);
    -moz-transform: skew(45deg, 0);
    -o-transform: skew(45deg, 0);
    -ms-transform: skew(45deg, 0);
}