flex_display | R Documentation |
The flex_*()
functions adjust the flexbox layout of an element. The flexbox
layout is incredibly powerful and allows centering of elements vertically and
horizontally, automatic adjustment of space between and around child
elements, and more. To use flexbox make sure to include flex_display()
when
styling an element. To adjust an element's display at breakpoints see
display()
.
Direct child elements of a flex box container are automatically considered
flex items and may be adjusted with the item_*()
functions, see
item_align()
.
flex_display(x)
x |
A tag element or .style pronoun. |
Using flexbox, flex_display()
, a tag element's child elements are
considered flex items. The item_*()
functions are used to modify the
bahvior of these flex items. So, while flex_*()
functions are applied to
the parent element, all the item_*()
functions are applied to the
individual child flex item elements.
An object of the same type as x
.
Other flex utilities:
flex_align()
,
flex_content()
,
flex_direction()
,
flex_justify()
,
flex_wrap()
,
item_align()
,
item_fill()
,
item_grow()
,
item_order()
library(htmltools)
div(
.style %>%
flex_display() %>%
flex_justify("end"),
div("Flex item"),
div("Flex item"),
div("Flex item")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.