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.
-->
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.
This adds padding-inline
to the element you apply it to.
Wrap
behaves like Vertical so you can place items on the left, center, or right 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.
Wrap
is used to prevent content from touching the edges of the screen.
Wrap
has width
and max-width
set to 100%
so it stretches the entire width.
To constrain the wrapped element, set the width
property. (Using width
instead of max-width
prevents the element from collapsing when there’s insufficient content).
When one Wrap
follows another, the second Wrap
has a default margin-top
of 1rem
for visual separation. You can change this value by writing some CSS.
Create full-width backgrounds by placing Wrap
inside an element with a background.
If you need to break out from the Wrap
element, you can use Breakout
. After breaking out, you can still add Wrap
or padding-inline
to prevent inner content from touching the edges of the screen.
Wrap
behaves like Vertical
so you can align items to the left, center, or right easily.
You can change the gap between items with the gap
property or the --gap
variable.
Splendid Labz is free because we love developers and we want to contribute back to the ecosystem.
We only charge for access to the documentation to keep the project going. If you don't wish to pay, feel free to use the content from the features tab, our blogs or our videos as your guide.
Wrap
is used to prevent content from touching the edges of the screen.
Wrap
has width
and max-width
set to 100%
so it stretches the entire width.
To constrain the wrapped element, set the width
property. (Using width
instead of max-width
prevents the element from collapsing when there’s insufficient content).
When one Wrap
follows another, the second Wrap
has a default margin-top
of 1rem
for visual separation. You can change this value by writing some CSS.
Create full-width backgrounds by placing Wrap
inside an element with a background.
If you need to break out from the Wrap
element, you can use Breakout
. After breaking out, you can still add Wrap
or padding-inline
to prevent inner content from touching the edges of the screen.
Wrap
behaves like Vertical
so you can align items to the left, center, or right easily.
You can change the gap between items with the gap
property or the --gap
variable.
Here’s the CSS for Wrap
. We wrote it in Sass so you may have to adjust it accordingly.
Splendid Labz is free because we love developers and we want to contribute back to the ecosystem.
We only charge for access to the documentation to keep the project going. If you don't wish to pay, feel free to use the content from the features tab, our blogs or our videos as your guide.
Here’s the CSS for Wrap
. We wrote it in Sass so you may have to adjust it accordingly.
Property | Default | Description |
---|---|---|
gap | 1rem | Sets the gap between child elements. |
width | 100% | Sets the width of the element. |
Variable | Default | Description |
---|---|---|
--gap | 1rem | Sets the gap between child elements. |
Class | Description |
---|---|
self-stretch | Default value. Stretches the item. |
self-start | Aligns the item to the start (left). |
self-center | Aligns the item to the center. |
self-end | Aligns the item to the end (right). |
Splendid Labz is free because we love developers and we want to contribute back to the ecosystem.
We only charge for access to the documentation to keep the project going. If you don't wish to pay, feel free to use the content from the features tab, our blogs or our videos as your guide.
Property | Default | Description |
---|---|---|
gap | 1rem | Sets the gap between child elements. |
width | 100% | Sets the width of the element. |
Variable | Default | Description |
---|---|---|
--gap | 1rem | Sets the gap between child elements. |
Class | Description |
---|---|
self-stretch | Default value. Stretches the item. |
self-start | Aligns the item to the start (left). |
self-center | Aligns the item to the center. |
self-end | Aligns the item to the end (right). |