Text Wrap

Set how text wraps within an element.

Newly available

This feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

Chrome
Edge
Firefox
Safari

tw-b
text-wrap: balance;
tw-n
text-wrap: nowrap;
tw-p
text-wrap: pretty;
tw-w
text-wrap: wrap;

Responsiveness

Use breakpoint prefixes to target different screen sizes. Styles apply from the breakpoint & up.

Target viewport sizes with breakpoint prefixes.

sm:tw-(value)
Small640px
md:tw-(value)
Medium768px
lg:tw-(value)
Large1024px
xxl:tw-(value)
Extra Large1536px

Hover State

Apply styles conditionally on hover using the h: prefix.

Add the h: prefix to apply styles only when the user hovers over the element.

Syntax:h:tw-(value)