JSFiddle - React, Tailwind, and code Playground

HTML

<div class="border">
  <div class="border__item">
    <div class="border__element"></div>
  </div>
</div>

SCSS

.border {
  border: 2px solid black;
  width: 200x;
  height: 200px;
  position: relative;
  
  &__item {
    position: absolute;
    left: 0;
    bottom: -2px;
    right: 0;
    height: 2px;
    background: red;
    display: flex;
    align-items: center;
    
    &:before {
        content: '';
        height: 2px;
        background: blue;
        width: 70%;
    }
    
        &:after {
        content: '';
        height: 2px;
        background: blue;
        width: 30%
    }
  }
  
  &__element {
    width: 30px;
    height: 30px;
    background: red;
    margin: 0 20px
  }
}