JSFiddle - React, Tailwind, and code Playground

HTML

<div class="hexagon"></div>

CSS

.hexagon {
  position: relative;
  width: 400px; 
  height: 230.94px;
  background-color: transparent;
  margin: 115.47px 0;
  border-left: solid 8px #333333;
  border-right: solid 8px #333333;
}

.hexagon:before,
.hexagon:after {
  content: "";
  position: absolute;
  z-index: 1;
  width: 282.84px;
  height: 282.84px;
  -webkit-transform: scaleY(0.5774) rotate(-45deg);
  -ms-transform: scaleY(0.5774) rotate(-45deg);
  transform: scaleY(0.5774) rotate(-45deg);
  background-color: inherit;
  left: 50.5786px;
}

.hexagon:before {
  top: -141.4214px;
  border-top: solid 11.3137px #333333;
  border-right: solid 11.3137px #333333;
}

.hexagon:after {
  bottom: -141.4214px;
  border-bottom: solid 11.3137px #333333;
  border-left: solid 11.3137px #333333;
}