JSFiddle - React, Tailwind, and code Playground

HTML

<div class="obal"></div>

CSS

.obal {
  width: 100px;
  height: 100px;
  border: 2px solid black;
  margin: 40px;
  position: relative;
}
.obal:before{
  content: '';
  height: 2px;
  width: 40px;
  background: red;
  position: absolute;
  right: -42px;
  bottom: -2px;
  transform: rotate(0deg);
}