add_colored_box: Add a box with specified color in an R Markdown file.

Description Usage Arguments Examples

View source: R/helper_html.R

Description

add_colored_box returns a box component generated by htmltools with specified color and styles.

Usage

1
2
3
4
5
6
7
8
9
add_colored_box(
  type = "blue-default",
  label = "",
  info = "place details here using info option",
  bgcolor = NULL,
  width = 0.5,
  halign = "c",
  top = FALSE
)

Arguments

type

One of:

  • NULL for no default color or label

  • 'blue-default' for a steel-blue box

  • 'gray-info' for a gray box

  • 'blue-info' for a blue box

  • 'green-remainder' for a green box

  • 'yellow-warning' for a yellow box

  • 'red-stop' for a red box

label

One of:

  • NULL for no label if type is NULL or using label set by type

  • A string shown on the top of box

info

A string including the main message of the box

bgcolor

NA or a length 3 vector with integer elements between 0 to 255

width

NA or a number between 0.25 to 0.95

halign

One of:

  • NA for center aligned

  • 'c' for center aligned

  • 'r' for right aligned

top

One of:

  • NA

  • FALSE for inline

  • TRUE for top-of-page

Examples

1
add_colored_box( type='blue-default', info='the document include information regarding...')

mtb documentation built on Feb. 5, 2022, 1:07 a.m.