glin / reactable

Interactive data tables for R
https://glin.github.io/reactable
Other
627 stars 80 forks source link

Add title elements #185

Open lenafm opened 3 years ago

lenafm commented 3 years ago

Add title, subtitle, caption and logo elements to reactable table.

The new elements can be styled using CSS with titleStyle, subtitleStyle, captionStyle, and logoStyle respectively. The background behind the elements can be styled using CSS with backgroundStyle.

Passing a string or character vector of google fonts to googlefonts imports the fonts.

title <- "some title"
titleStyle <- "color: red; font-family: Lato; font-size:18px;"
tbl <- reactable(data.frame(x = "a", stringsAsFactors = TRUE), title = title, titleStyle = titleStyle, googlefonts = "Lato")

image