Skip to contents

Heavy black rules, a solid label bar, and a display face at a large size.

Usage

gt_theme_brutalist(
  gt_object,
  accent = "#FF3B00",
  density = c("comfortable", "compact", "social"),
  ...
)

Arguments

gt_object

A gt table object to modify.

accent

Character. The theme's single accent color, used on the row-group labels. Defaults to "#FF3B00".

density

Character. The type and padding scale. One of "comfortable", "compact", or "social". See Density. Defaults to "comfortable".

...

Additional arguments passed to gt::tab_options, applied last so they override anything the theme sets.

Value

Returns a modified gt table with the theme applied.

Details

The accent color is used in exactly one place, on the row-group labels.

Density

density sets the type and padding scale together. "comfortable" uses a 14px body with roomy rows, "compact" a 12px body with tight rows, and "social" a 17px body with generous rows and a larger title, at the scale gt_save_crop() and gt_social_crop() export at.

Figures

Preview of the brutalist theme

Examples

library(gt)
afc_south <- subset(
  sdv_example_standings, division == "AFC South",
  c(team_name, wins:points_against)
)
gt(afc_south) |> gt_theme_brutalist()
team_name wins losses ties win_pct points_for points_against
Jacksonville Jaguars 13 4 0 0.765 474 336
Houston Texans 12 5 0 0.706 404 295
Indianapolis Colts 8 9 0 0.471 466 412
Tennessee Titans 3 14 0 0.176 284 478
gt(afc_south) |> gt_theme_brutalist(accent = "#0033FF", density = "social")
team_name wins losses ties win_pct points_for points_against
Jacksonville Jaguars 13 4 0 0.765 474 336
Houston Texans 12 5 0 0.706 404 295
Indianapolis Colts 8 9 0 0.471 466 412
Tennessee Titans 3 14 0 0.176 284 478