Skip to contents

The item_align() function adjusts

Usage

item_align(x, ...)

Arguments

x

A tag element or .style pronoun.

...

A character string specifying an alignment. One of,

  • "start"

  • "end"

  • "center"

  • "baseline"

  • "stretch"

    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() %>%
    flex_align("end"),
  div("Flex item"),
  div(
    .style %>%
      item_align("start"),
    "Flex item (self aligned)"
  ),
  div("Flex item")
)
#> <div class="d-flex align-items-end">
#>   <div>Flex item</div>
#>   <div class="align-self-start">Flex item (self aligned)</div>
#>   <div>Flex item</div>
#> </div>