#' @title
#' Bulma Alignment Modifier
#'
#' @description
#' These functions change the alignment of the text inside a container.
#'
#' @param tag (tag) to be modified
#' @param align (string) `left`, `right`, or `centered`
#'
#' @family Bulma Modifiers
#' @export
bulma_align <- function(tag, align = c("left", "right", "centered")) {
align <- match_arg(align)
bulma_is(tag, align)
}
#' @describeIn bulma_align text alignment
#'
#' @param align (str) alignment of the text
#' @param breakpoint (str) breakpoint applicable
#' @param tag (tag) tag to be modified
#'
#' @export
bulma_text_align <- function(tag,
align = c("left", "centered",
"justified", "right"),
breakpoint = c("mobile", "touch", "tablet-only",
"tablet", "desktop-only",
"desktop", "widescreen-only",
"widescreen", "fullhd")) {
align <- match_arg(align)
breakpoint <- match_arg(breakpoint)
if (!is.null(breakpoint)) {
bulma_has_text(tag, glue("{align}-{breakpoint}"))
} else {
bulma_has_text(tag, align)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.