The item_order() function adjusts the visual order of a tag element.
Arguments
- x
A tag element or .style pronoun.
- ...
A number or character string specifying a position. One of,
012345"first""last"Use name-value pairs to specify breakpoints.
See also
Other flex utilities:
flex_align(),
flex_content(),
flex_direction(),
flex_display(),
flex_justify(),
flex_wrap(),
item_align(),
item_fill(),
item_grow()
Examples
library(htmltools)
div(
.style %>%
flex_display(),
div(
.style %>%
item_order(3),
"Third flex item"
),
div(
.style %>%
item_order(2),
"Second flex item"
),
div(
"First flex item"
)
)
#> <div class="d-flex">
#> <div class="order-3">Third flex item</div>
#> <div class="order-2">Second flex item</div>
#> <div>First flex item</div>
#> </div>