text-overflow
Utilities for controlling how the text of an element overflows.
| Class | Effect |
|---|---|
truncate |
overflow: hidden; text-overflow: ellipsis; white-space: nowrap; |
text-ellipsis |
text-overflow: ellipsis; |
text-clip |
text-overflow: clip; |
Examples
Section titled “Examples”Truncating text
Section titled “Truncating text”Use truncate to keep text on one line and end it with an ellipsis.


if ui.div("w-64 rounded-lg bg-gray-50 p-4 dark:bg-white/5") { ui.text(PROSE, "truncate text-sm text-gray-700 dark:text-gray-300")}