item_order: Flex reordering

View source: R/item-order.R

item_orderR Documentation

Flex reordering

Description

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

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"
  )
)


cascadess documentation built on Oct. 30, 2024, 9:29 a.m.