#' @title
#' Bulma Flexbox
#'
#' @description
#' Helpers for all Flexbox properties
#'
#' [Flexbox Helpers](https://bulma.io/documentation/helpers/flexbox-helpers/)
#'
#' @param tag (string) tag to be modified
#' @param direction,wrap,justify,align_content,align_items,align_self
#' flexbox properties (see css reference).
#' @param grow,shrink flexbox properties (see css reference).
#'
#' @family Bulma Modifiers
#' @export
bulma_flex <- function(tag,
direction = c("column", "row",
"column-reverse", "row-reverse"),
wrap = c("nowrap", "wrap", "wrap-reverse"),
justify = c("flex-start", "flex-end", "center",
"space-between", "space-around",
"space-evenly", "start", "end", "left",
"right"),
align_content = c("flex-start", "flex-end", "center",
"space-between", "space-around",
"space-evenly", "start", "end",
"stretch", "baseline"),
align_items = c("stretch", "flex-start", "flex-end",
"center", "baseline", "start", "end",
"self-start", "self-end"),
align_self = c("auto", "flex-start", "flex-end",
"center", "baseline", "stretch"),
grow = 0:5, shrink = 0:5) {
direction <- match_arg(direction)
wrap <- match_arg(wrap)
justify <- match_arg(justify)
align_content <- match_arg(align_content)
align_items <- match_arg(align_items)
align_self <- match_arg(align_self)
grow <- match_arg(grow)
shrink <- match_arg(shrink)
tag %>%
bulma_is("flex") %>%
bulma_is(glue("flex-direction-{direction}")) %>%
bulma_is(glue("flex-wrap-{wrap}")) %>%
bulma_is(glue("flex-justify-content-{justify}")) %>%
bulma_is(glue("flex-align-content-{align_content}")) %>%
bulma_is(glue("flex-align-items-{align_items}")) %>%
bulma_is(glue("flex-align-self-{align_self}")) %>%
bulma_is(glue("flex-grow-{grow}")) %>%
bulma_is(glue("flex-shrink-{shrink}"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.