JSFiddle - React, Tailwind, and code Playground
HTML
<div class="toolong">
this text is just too loooooooooooooooooooooooooong
</div>
CSS
.toolong {
width: 300px;
overflow:hidden;
white-space:nowrap;
text-overflow: ellipsis;
}