text_weight: Text weight

View source: R/text-weight.R

text_weightR Documentation

Text weight

Description

The text_weight() function adjusts the font weight of a tag element.

Usage

text_weight(x, weight)

Arguments

x

A tag element or .style pronoun.

weight

A character string specifying the font weight. One of,

  • "bold"

  • "bolder"

  • "semibold"

  • "medium"

  • "normal"

  • "light"

  • "lighter"

    "bolder" and "lighter" change the font weight relative to the current font weight.

Value

An object of the same type as x.

See Also

Other text utilities: text_alignment(), text_break(), text_color(), text_decoration(), text_height(), text_selection(), text_style(), text_transform(), text_wrap()

Examples


library(htmltools)

p(
  .style %>%
    text_weight("bold"),
  "Bold"
)

p(
  .style %>%
    text_weight("light"),
  "Light"
)


cascadess documentation built on Oct. 30, 2024, 9:29 a.m.