JSFiddle - React, Tailwind, and code Playground

by David Sch

HTML

<span class="text">this is a test</span>

CSS

.text {margin-top:50px;
  display:flex;

  }
.text:before, .text:after {
  content:'';
  flex:1;
  margin: auto 0.5rem;
 height: 1px;
}

.text:before {
  background:linear-gradient(to right, #fff 0px, #bdbdbd 100%); 
}

.text:after {
    background:linear-gradient(to left, #fff 0px, #bdbdbd 100%); 
}