JSFiddle - React, Tailwind, and code Playground

HTML

<div class="box">
    <div>rotated text</div>
</div>
<div class="box">
    <div>rotated text</div>
</div>

CSS

.box {
    display: inline-block;
    border: 1px solid blue;
    width: 20px;
    height: 200px;
}
.box > div {
    text-align: center;
    display:inline-block;
    border: 1px solid red;
    width: 200px;
    height: 20px;
    transform: rotate(-90deg) translate(-100%, 0);
    transform-origin: 0 0;
}