text-wrap
Utilities for controlling how text wraps within an element.
| Class | Effect |
|---|---|
text-wrap |
text-wrap: wrap; |
text-nowrap |
text-wrap: nowrap; |
text-balance |
text-wrap: balance; |
text-pretty |
text-wrap: pretty; |
Examples
Section titled “Examples”Allowing text to wrap
Section titled “Allowing text to wrap”

if ui.div("w-72") { ui.text("Beloved Manhattan soup stand closes", "text-wrap text-2xl font-bold text-gray-950 dark:text-white")}Preventing text from wrapping
Section titled “Preventing text from wrapping”

if ui.div("w-72 overflow-hidden") { ui.text("Beloved Manhattan soup stand closes", "text-nowrap text-2xl font-bold text-gray-950 dark:text-white")}