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

Usage

Wrap

Initial value

Bleak House by Charles Dickens
London. Michaelmas term lately over, and the Lord Chancellor sitting in Lincoln's Inn Hall. Implacable November weather. As much mud in the streets as if the waters had but newly retired from the face of the earth, and it would not be wonderful to meet a Megalosaurus, forty feet long or so, waddling like an elephantine lizard up Holborn Hill. London. Michaelmas term lately over, and the Lord Chancellor sitting in Lincoln's Inn Hall. Implacable November weather. As much mud in the streets as if the waters had but newly retired from the face of the earth, and it would not be wonderful to meet a Megalosaurus, forty feet long or so, waddling like an elephantine lizard up Holborn Hill.
<div class="d-g g-4 max-w-64 mx-auto">
<div class="fs-xl fw-600 c-slate tw-w">Bleak House by Charles Dickens</div>
<div class="fs-sm c-gray-7">
London. Michaelmas term lately over, and the Lord Chancellor sitting in Lincoln's Inn Hall...
</div>
</div>

Balance

Bleak House by Charles Dickens
London. Michaelmas term lately over, and the Lord Chancellor sitting in Lincoln's Inn Hall. Implacable November weather. As much mud in the streets as if the waters had but newly retired from the face of the earth, and it would not be wonderful to meet a Megalosaurus, forty feet long or so, waddling like an elephantine lizard up Holborn Hill. London. Michaelmas term lately over, and the Lord Chancellor sitting in Lincoln's Inn Hall. Implacable November weather. As much mud in the streets as if the waters had but newly retired from the face of the earth, and it would not be wonderful to meet a Megalosaurus, forty feet long or so, waddling like an elephantine lizard up Holborn Hill.
<div class="d-g g-4 max-w-64 mx-auto">
<div class="fs-xl fw-600 c-slate tw-b">Bleak House by Charles Dickens</div>
<div class="fs-sm c-gray-7">
London. Michaelmas term lately over, and the Lord Chancellor sitting in Lincoln's Inn Hall...
</div>
</div>

No Wrap

Bleak House by Charles Dickens
London. Michaelmas term lately over, and the Lord Chancellor sitting in Lincoln's Inn Hall. Implacable November weather. As much mud in the streets as if the waters had but newly retired from the face of the earth, and it would not be wonderful to meet a Megalosaurus, forty feet long or so, waddling like an elephantine lizard up Holborn Hill. London. Michaelmas term lately over, and the Lord Chancellor sitting in Lincoln's Inn Hall. Implacable November weather. As much mud in the streets as if the waters had but newly retired from the face of the earth, and it would not be wonderful to meet a Megalosaurus, forty feet long or so, waddling like an elephantine lizard up Holborn Hill.
<div class="d-g g-4 max-w-64 mx-auto">
<div class="fs-xl fw-600 c-slate tw-nw">Bleak House by Charles Dickens</div>
<div class="fs-sm c-gray-7">
London. Michaelmas term lately over, and the Lord Chancellor sitting in Lincoln's Inn Hall...
</div>
</div>

Pretty

Bleak House by Charles Dickens
London. Michaelmas term lately over, and the Lord Chancellor sitting in Lincoln's Inn Hall. Implacable November weather. As much mud in the streets as if the waters had but newly retired from the face of the earth, and it would not be wonderful to meet a Megalosaurus, forty feet long or so, waddling like an elephantine lizard up Holborn Hill. London. Michaelmas term lately over, and the Lord Chancellor sitting in Lincoln's Inn Hall. Implacable November weather. As much mud in the streets as if the waters had but newly retired from the face of the earth, and it would not be wonderful to meet a Megalosaurus, forty feet long or so, waddling like an elephantine lizard up Holborn Hill.
<div class="d-g g-4 max-w-64 mx-auto">
<div class="fs-xl fw-600 c-slate tw-p">Bleak House by Charles Dickens</div>
<div class="fs-sm c-gray-7">
London. Michaelmas term lately over, and the Lord Chancellor sitting in Lincoln's Inn Hall...
</div>
</div>

Responsiveness

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

Target viewport sizes with breakpoint prefixes.

sm:tw-*
Small640px
md:tw-*
Medium768px
lg:tw-*
Large1024px
xxl:tw-*
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-*