Learn R Programming

yonder (version 0.1.0)

background: Tag element background color

Description

Use background() to modify the background color of a tag element.

Usage

background(tag, color)

Arguments

tag

A tag element.

color

One of "red", "purple", "indigo", "blue", "cyan", "teal", "green", "yellow", "amber", "orange", "grey", "white", or "transparent" character string specifying the background color.

See Also

Other design: active, affix, border, display, float, font, height, padding, scroll, shadow, width

Examples

Run this code
# NOT RUN {
### Modifying input elements

checkbarInput(
  id = NULL,
  choices = c(
    "Nunc rutrum turpis sed pede.",
    "Etiam vel neque.",
    "Lorem ipsum dolor sit amet."
  )
) %>%
  background("cyan")

### Possible colors

colors <- c(
  "red", "purple", "indigo", "blue", "cyan", "teal", "green",
  "yellow", "amber", "orange", "grey", "white"
)

div(
  lapply(
    colors,
    background,
    tag = div() %>%
      padding(5) %>%
      margin(2)
  )
) %>%
  display("flex") %>%
  flex(wrap = TRUE)

# }

Run the code above in your browser using DataLab