Skip to contents

Apply a font from Google Fonts <https://fonts.google.com/> to the table.

Usage

google_font(
  table = NULL,
  font_family = "Poppins",
  font_weight = 400,
  font_style = "normal"
)

Arguments

table

Null.

font_family

Color of the font for the text within the table. Default is #222222.

font_weight

The numeric weight of the font. Must be a value between 100 and 900. Note: not every font on Google Fonts has all font weights available. Please check <https://fonts.google.com/> for available weights for desired font family. Default is 400.

font_style

Style of the text font. Options are "normal" or "italic". Default is "normal".

Value

a function that applies a font to a reactable table.

Examples

if (FALSE) {
data <- iris[10:29, ]

## Default 'Poppins' font from Google Fonts
reactable(data) %>%
google_font()

## Apply styles to fonts
reactable(data) %>%
google_font("Roboto Mono", font_weight = 500, font_style = "italic")
}