Skip to contents

The flex_wrap() function adjusts how a tag element's child elements wrap, or don't wrap, onto new lines.

Usage

flex_wrap(x, ...)

Arguments

x

A tag element or .style pronoun.

...

A boolean specifying to wrap or not wrap. One of,

  • TRUE

  • FALSE

Value

An object of the same type as x.

See also

Examples


library(htmltools)

div(
  .style %>%
    flex_display() %>%
    flex_wrap(FALSE),
  div("Flex item"),
  div("Flex item"),
  div("Flex item"),
  div("Flex item")
)
#> <div class="d-flex flex-nowrap">
#>   <div>Flex item</div>
#>   <div>Flex item</div>
#>   <div>Flex item</div>
#>   <div>Flex item</div>
#> </div>