JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://dotdotdot.frebsite.nl/js/jquery.dotdotdot-1.2.1.js"></script>
<div id = "multilinedText">
This text is so big that it won't fit in a single line, maybe we could use two lines or even three!
</div>
CSS
#multilinedText {
margin: 50px;
padding: 10px;
width: 150px;
height: 60px;
background-color: lightblue;
}
JavaScript
$("#multilinedText").dotdotdot()