The border_color() and border_subtle() functions adjust the border
color of a tag element.
Arguments
- x
A tag element or .style pronoun.
- color
A character string specifying a color. One of,
"primary""secondary""success""danger""warning""info""light""dark"
See also
Other border utilities:
border_width()
Examples
library(htmltools)
div(
.style %>%
border_color(theme_primary())
)
#> <div class="border-primary"></div>
div(
.style %>%
background_subtle(theme_danger()) %>%
border_subtle(theme_danger()) %>%
text_emphasis(theme_danger()),
"Danger theme with some emphasis"
)
#> <div class="bg-danger-subtle border-danger-subtle text-danger-emphasis">Danger theme with some emphasis</div>
div(
.style %>%
background_subtle(theme_light()) %>%
text_emphasis(theme_light()) %>%
border_subtle(theme_light())
)
#> <div class="bg-light-subtle text-light-emphasis border-light-subtle"></div>