Skip to contents

The item_order() function adjusts the visual order of a tag element.

Usage

item_order(x, ...)

Arguments

x

A tag element or .style pronoun.

...

A number or character string specifying a position. One of,

  • 0

  • 1

  • 2

  • 3

  • 4

  • 5

  • "first"

  • "last"

    Use name-value pairs to specify breakpoints.

Value

An object of the same type as x.

See also

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>