Open this example in the interactive library
Source code
<div class="demo max-w-56 truncate">
A long filename that will not fit in the available space.pdf
</div>
Truncate a single line with an ellipsis with Tailwind CSS 4 utilities. The preview uses precompiled styles.
Open this example in the interactive library
<div class="demo max-w-56 truncate">
A long filename that will not fit in the available space.pdf
</div>