border: Borders

Description Usage Arguments Colors Round Examples

View source: R/border.R

Description

The border() function adjusts a tag element's borders.

Usage

1
border(x, color, sides = TRUE, width = 1, round = "medium")

Arguments

x

A tag element or .style pronoun.

color

One of "blue", "indigo", "purple", "red", "orange", "yellow", "green", "teal", "cyan", or "white" specifying the border color.

sides

One or more of "top", "t", "right", "r", "bottom", "b", "left", "l", "all", or "none" specifying which sides to add borders to, defaults to TRUE. TRUE and FALSE may be used as shorthand for all sides or no sides, respectively.

width

One or more of 1, 2, 3, 4, or 5 specifying the width of the element's border, defaults to 1.

round

One of "small", "sm", "medium", "md", "large", "lg", or "none" specifying how to round the corners of the element, defaults to "medium".

Colors

html_preserve

blue

indigo

purple

red

orange

yellow

green

teal

cyan

white

/html_preserve

Round

html_preserve

small

sm

medium

md

large

lg

none

/html_preserve

Examples

1
2
3
4
5
6
7
8
library(htmltools)

h3(
  .style %>%
    border("red", "bottom") %>%
    text("red"),
  "A bright, underlined heading!"
)

cascadess documentation built on Jan. 13, 2021, 5:10 p.m.