Skip to contents

The text_alignment() function adjusts how the text within a tag element is aligned.

Usage

text_alignment(x, ...)

Arguments

x

A tag element or .style pronoun.

...

A character string specifying an alignment. One of,

"left", "right", or "center".

Use name-value pairs to specify breakpoints.

Value

An object of the same type as x.

Examples


library(htmltools)

div(
  .style %>%
    text_alignment("left")
)
#> <div class="text-start"></div>

div(
  .style %>%
    text_alignment("center")
)
#> <div class="text-center"></div>