Typography
Utilities for controlling word breaks in an element.
Class | Styles |
---|---|
break-normal | overflow-wrap: normal;
word-break: normal; |
break-words | overflow-wrap: break-word; |
break-all | word-break: break-all; |
break-keep | word-break: keep-all; |
Use the break-normal
utility to only add line breaks at normal word break points:
Use the break-words
utility to add line breaks mid-word if needed:
Use the break-all
utility to add line breaks whenever necessary, without trying to preserve whole words:
Use the break-keep
utility to prevent line breaks from being applied to Chinese/Japanese/Korean (CJK) text:
For non-CJK text the break-keep
utility has the same behavior as the break-normal
utility.
Prefix a word-break
utility with a breakpoint variant like md:
to only apply the utility at medium screen sizes and above:
<p class="break-normal md:break-all ..."> <!-- ... --></p>
Learn more about using variants in the variants documentation.