Add images as the column label for a table
Usage
img_header(
label,
img_url,
height = 60,
font_size = 12,
palette = c("black", "black")
)Examples
library(gt)
dplyr::tibble(
x = 1:5, y = 6:10
) %>%
gt() %>%
cols_label(
x = img_header(
"Luka Doncic",
"https://secure.espn.com/combiner/i?img=/i/headshots/nba/players/full/3945274.png",
height = 60,
font_size = 14
)
)See also
Other Utilities:
add_text_img(),
fa_icon_repeat(),
fmt_pad_num(),
fmt_pct_extra(),
fmt_symbol_first(),
generate_df(),
gt_add_divider(),
gt_badge(),
gt_double_table(),
gt_duplicate_column(),
gt_fa_rank_change(),
gt_fa_rating(),
gt_highlight_cols(),
gt_highlight_rows(),
gt_img_border(),
gt_img_circle(),
gt_img_multi_rows(),
gt_img_rows(),
gt_index(),
gt_merge_stack(),
gt_merge_stack_color(),
gt_two_column_layout(),
gtsave_extra(),
pad_fn(),
tab_style_by_grp()

