JSFiddle - React, Tailwind, and code Playground
HTML
<h1>Какой-то заголовок </h1>
CSS
h1 {
display: table-row;
white-space: nowrap;
}
h1:after {
content: "";
border-bottom: 1px solid;
width: 100%;
display: table-cell;
position: relative;
bottom: 8px;
}