Typography
Utilities for controlling word breaks in an element.
Use break-normal
to only add line breaks at normal word break points.
The longest word in any of the major English language dictionaries is pneumonoultramicroscopicsilicovolcanoconiosis, a word that refers to a lung disease contracted from the inhalation of very fine silica particles, specifically from a volcano; medically, it is the same as silicosis.
<p class="break-normal ...">...</p>
Use break-words
to add line breaks mid-word if needed.
The longest word in any of the major English language dictionaries is pneumonoultramicroscopicsilicovolcanoconiosis, a word that refers to a lung disease contracted from the inhalation of very fine silica particles, specifically from a volcano; medically, it is the same as silicosis.
<p class="break-words ...">...</p>
Use break-all
to add line breaks whenever necessary, without trying to preserve whole words.
The longest word in any of the major English language dictionaries is pneumonoultramicroscopicsilicovolcanoconiosis, a word that refers to a lung disease contracted from the inhalation of very fine silica particles, specifically from a volcano; medically, it is the same as silicosis.
<p class="break-all ...">...</p>
Tailwind lets you conditionally apply utility classes in different states using variant modifiers. For example, use hover:break-all
to only apply the break-all
utility on hover.
<p class="break-normal hover:break-all">
<!-- ... -->
</p>
For a complete list of all available state modifiers, check out the Hover, Focus, & Other States documentation.
You can also use variant modifiers to target media queries like responsive breakpoints, dark mode, prefers-reduced-motion, and more. For example, use md:break-all
to apply the break-all
utility at only medium screen sizes and above.
<p class="break-normal md:break-all">
<!-- ... -->
</p>
To learn more, check out the documentation on Responsive Design, Dark Mode and other media query modifiers.