Description Usage Arguments See Also Examples
Use background()
to modify the background color of a tag element.
1 | background(tag, color)
|
tag |
A tag element. |
color |
One of " |
Other design utilities:
active()
,
affix()
,
border()
,
display()
,
float()
,
font()
,
height()
,
padding()
,
scroll()
,
shadow()
,
width()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | ### Modifying input elements
checkbarInput(
id = "bar1",
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.