JSFiddle - React, Tailwind, and code Playground
HTML
<div class="root">
<div class="slash">
</div>
</div>
CSS
.root {
border: 1px solid gray;
background-color: yellow;
width: 100%;
height: 200px;
position: relative;
overflow: hidden;
}
.slash {
width: 200%;
height: 200%;
background-color: white;
border: 5px solid gray;
transform: rotate(45deg) translateY(100%);
}