Skip to contents

The flex_justify() function adjusts a tag element's main axis alignment. By default, the main axis is the x-axis. When using flex_direction("column") the main axis becomes the y-axis.

Usage

flex_justify(x, ...)

Arguments

x

A tag element or .style pronoun.

...

A character string specifying the main axis alignment. One of,

  • "start"

  • "end"

  • "center"

  • "between"

  • "around"

  • "evenly"

    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_justify("end"),
  div("Flex item"),
  div("Flex item"),
  div("Flex item")
)
#> <div class="d-flex justify-content-end">
#>   <div>Flex item</div>
#>   <div>Flex item</div>
#>   <div>Flex item</div>
#> </div>