Learn R Programming

yonder (version 0.1.0)

border: Tag element borders

Description

Use border() to add or modify tag element borders.

Usage

border(tag, color = NULL, sides = "all", round = NULL)

Arguments

tag

A tag element.

color

One of "red", "purple", "indigo", "blue", "cyan", "teal", "green", "yellow", "amber", "orange", "grey", "white" specifying the border color, defaults to NULL.

sides

One or more of "top", "right", "bottom", "left" or "all" or "none" specifying which sides to add a border to, defaults to "all".

round

One or more of "top", "right", "bottom", "left", "circle", "all", or "none" specifying how to round the border(s) of a tag element, defaults to NULL, in which case the argument is ignored.

See Also

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

Examples

Run this code
# NOT RUN {
### Change border color

div(
  div() %>%
    height(3) %>%
    width(3) %>%
    border("green"),
  div() %>%
    height(3) %>%
    width(3) %>%
    border(
      color = "blue",
      sides = c("left", "right")
    )
)

### Round sides

sides <- c("top", "right", "bottom", "left", "circle", "all")

div(
  lapply(
    sides,
    border,
    tag = div() %>%
      height(3) %>%
      width(3),
    color = "black"
  )
) %>%
  display("flex") %>%
  flex(wrap = TRUE)

# }

Run the code above in your browser using DataLab