JSFiddle - React, Tailwind, and code Playground

HTML

<p>
  In this example the <code>-webkit-line-clamp</code> property is set to
  <code>3</code>, which means the text is clamped after three lines. An ellipsis
  will be shown at the point where the text is clamped.
  
  <img src="https://www.kasandbox.org/programming-images/avatars/leaf-blue.png">
</p>

CSS

p {
  width: 300px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}