JSFiddle - React, Tailwind, and code Playground
HTML
<div>
a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x y z
</div>
CSS
div
{
height:40px;
overflow:hidden;
width:260px;
border:1px solid red;
}