Skip to contents

Bootstrap-inspired flatly theme

Usage

flatly(
  font_size = 14,
  font_color = "#212529",
  header_font_size = 15,
  header_font_color = "#ffffff",
  cell_padding = 6,
  centered = FALSE
)

Arguments

font_size

Numeric value representing the size of the font within the table (in px). Default is 14.

font_color

Color of the font for the text within the table and the group headers. Default is #212529.

header_font_size

Numeric value representing the size of the font within the table (in px). Default is 15.

header_font_color

Color of the font for the header text. Default is #ffffff.

cell_padding

Numeric value representing the padding size between cells (in px). Default is 6.

centered

Logical: vertically center the contents of the table. Default is FALSE.

Value

an object of class theme that is applied to a reactable table.

Examples

data <- iris[10:29, ]

## Standard flatly theme
reactable(data,
          theme = flatly())
#> Error in x$width %||% settings$fig.width * settings$dpi: non-numeric argument to binary operator

## Additional options applied
reactable(data,
          theme = flatly(font_size = 12, font_color = "grey", cell_padding = 3))
#> Error in x$width %||% settings$fig.width * settings$dpi: non-numeric argument to binary operator