Vertical
Vertical
lets you lay things out vertically with Flexbox.
-->
Vertical
lets you lay things out vertically with Flexbox.
There are many advantages of using display:flex
over display:block
.
With Vertical
, you can adjust space between items with gap
. It’s more intuitive than margin
because there’s no need to deal with “margin collapse”.
You can use align-items
to shift all items to the left, center, or right.
You can use align-self
to shift individual child items to the left, center, or right too.
Vertical
lets you lay things out vertically. It’s basically just display: flex
+ flex-flow: column
with a couple of enhancements.
You can change the gap
between items with the gap
property or the --gap
variable.
Vertical
uses align-items
to align items horizontally.
Like SingleCol
, you can use align-self
to align each child item individually.
flex-grow
You can use flex-grow
to expand items when there is sufficient height to expand. This technique is used in Shell-simple
to expand Content
.
Vertical
also has Spacer
items to create spaces between the current item and the previous ones. As with the previous section on expanding items, this will only work if your Vertical
layout contains sufficient height.
Spacer
is simply sets the top margin to auto
. (To be more precise, we set
margin-block-start
).
One of the most common responsive tactics is to switch from a Vertical
layout to a Horizontal
layout when there is enough space.
You can use Tailwind Responsive modifiers to do this.
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.
Vertical
lets you lay things out vertically. It’s basically just display: flex
+ flex-flow: column
with a couple of enhancements.
You can change the gap
between items with the gap
property or the --gap
variable.
Vertical
uses align-items
to align items horizontally.
Like SingleCol
, you can use align-self
to align each child item individually.
flex-grow
You can use flex-grow
to expand items when there is sufficient height to expand. This technique is used in Shell-simple
to expand Content
.
Vertical
also has Spacer
items to create spaces between the current item and the previous ones. As with the previous section on expanding items, this will only work if your Vertical
layout contains sufficient height.
Spacer
is simply sets the top margin to auto
. (To be more precise, we set
margin-block-start
).
One of the most common responsive tactics is to switch from a Vertical
layout to a Horizontal
layout when there is enough space.
You can use Tailwind Responsive modifiers to do this.
Here’s the CSS for Vertical
.
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 Vertical
.
Class | Description |
---|---|
items-stretch | Default value. Stretch items. |
items-start | Aligns items to the left. |
items-center | Aligns items to the center. |
items-end | Aligns items to the right. |
Variable | Default | Description |
---|---|---|
--gap | 1rem | Gap between items |
Class | Description |
---|---|
self-start | Aligns item to the left. |
self-center | Aligns item to the center. |
self-end | Aligns item to the right. |
self-stretch | Default value. Stretches the item. |
Class | Description |
---|---|
Spacer | Creates a gap between this item and the one before |
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.
Class | Description |
---|---|
items-stretch | Default value. Stretch items. |
items-start | Aligns items to the left. |
items-center | Aligns items to the center. |
items-end | Aligns items to the right. |
Variable | Default | Description |
---|---|---|
--gap | 1rem | Gap between items |
Class | Description |
---|---|
self-start | Aligns item to the left. |
self-center | Aligns item to the center. |
self-end | Aligns item to the right. |
self-stretch | Default value. Stretches the item. |
Class | Description |
---|---|
Spacer | Creates a gap between this item and the one before |