Wrap

Wrap creates horizontal paddings so your content doesn’t touch the edges of the screen. It is commonly used directly in the Content of Shell layouts.


Pretty straightforward stuff

This adds padding-inline to the element you apply it to.

index.html
<div class="Wrap">Wrapped content</div>
Wrapped content

Behaves like Vertical

Wrap behaves like Vertical so you can place items on the left, center, or right easily.

index.html
<div class="Wrap">
<div class="self-start">Left-aligned</div>
<div class="self-center">Centered</div>
<div class="self-end">Right-aligned</div>
</div>
Left-aligned
Centered
Right-aligned

Set your maximum width easily

We’ve set max-width: 100% to Wrap so you can just set width easily.

The additional benefit of doing this: your content retains a minimum size at width even if there’s insufficient content.

index.html
<div class="Wrap w-[20rem]">Wrapped content</div>
Wrapped content