The stack_vertical()
and stack_horizontal()
functions are shortcuts
for creating vertical and horizontal flex layouts.
Arguments
- x
A tag element or .style pronoun.
Examples
library(htmltools)
div(
.style %>%
stack_vertical() %>%
gap_all(3),
p(
.style %>%
border_all() %>%
padding_all(2),
"First item"
),
p(
.style %>%
border_all() %>%
padding_all(2),
"Second item"
),
p(
.style %>%
border_all() %>%
padding_all(2),
"Third item"
)
)
#> <div class="vstack gap-3">
#> <p class="border p-2">First item</p>
#> <p class="border p-2">Second item</p>
#> <p class="border p-2">Third item</p>
#> </div>