border_color: Change border color

View source: R/border-color.R

border_colorR Documentation

Change border color

Description

The border_color() and border_subtle() functions adjust the border color of a tag element.

Usage

border_color(x, color)

border_subtle(x, color)

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"

Value

An object of the same type as x.

See Also

Other border utilities: border_width()

Examples


library(htmltools)

div(
  .style %>%
    border_color(theme_primary())
)

div(
  .style %>%
    background_subtle(theme_danger()) %>%
    border_subtle(theme_danger()) %>%
    text_emphasis(theme_danger()),
  "Danger theme with some emphasis"
)


div(
  .style %>%
    background_subtle(theme_light()) %>%
    text_emphasis(theme_light()) %>%
    border_subtle(theme_light())
)


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