The following table shows the template variables, their default values in the standard xaringan theme, the primary element to which the property is applied, and a brief description of the template variable.

For example, background_color by default sets the background-color CSS property of the .remark-slide-content class to #FFF.

Use this table to find the template variable you would like to modify. You can also use this table to find the CSS class or element associated with a particular template item.

Note that themes, like mono_accent(), have additional parameters, but with any theme function you can override the theme by directly setting the arguments below when calling the theme function. For example, to use mono_accent() with a different slide background color, you can call mono_accent(background_color = "#abc123").

variable description element default
text_color Text Color body #000
header_color Header Color h1, h2, h3 #000
background_color Slide Background Color .remark-slide-content #FFF
link_color Link Color a, a > code rgb(249, 38, 114)
text_bold_color Bold Text Color strong NULL
text_slide_number_color Slide Number Color .remark-slide-number inverse_background_color
padding Slide Padding in top right [bottom left] format .remark-slide-content 16px 64px 16px 64px
background_image Background image applied to each and every slide. Set title_slide_background_image = "none" to remove the background image from the title slide .remark-slide-content NULL
background_size Background image size, requires background_image to be set. If background_image is set, background_size will default to cover so the backround fills the screen. If both background_image and background_position are set, will default to 100 percent .remark-slide-content NULL
background_position Background image position, requires background_image to be set, and it is recommended to adjust background_size .remark-slide-content NULL
code_highlight_color Code Line Highlight .remark-code-line-highlighted rgba(255,255,0,0.5)
code_inline_color Inline Code Color .remark-inline-code #000
code_inline_background_color Inline Code Background Color .remark-inline-code NULL
code_inline_font_size Inline Code Text Font Size .remark-inline-code 1em
inverse_background_color Inverse Background Color .inverse #272822
inverse_text_color Inverse Text Color .inverse #d6d6d6
inverse_text_shadow Enables Shadow on text of inverse slides .inverse FALSE
inverse_header_color Inverse Header Color .inverse h1, .inverse h2, .inverse h3 #f3f3f3
title_slide_text_color Title Slide Text Color .title-slide inverse_text_color
title_slide_background_color Title Slide Background Color .title-slide inverse_background_color
title_slide_background_image Title Slide Background Image URL .title-slide NULL
title_slide_background_size Title Slide Background Image Size, defaults to “cover” if background image is set .title-slide NULL
title_slide_background_position Title Slide Background Image Position .title-slide NULL
footnote_color Footnote text color (if NA, then it will be the same color as text_color) .footnote NULL
footnote_font_size Footnote font size .footnote 0.9em
footnote_position_bottom Footnote location from bottom of screen .footnote 60px
left_column_subtle_color Left Column Text (not last) .left-column h2, .left-column h3 #777
left_column_selected_color Left Column Current Selection .left-column h2:last-of-type, .left-column h3:last-child #000
blockquote_left_border_color Blockquote Left Border Color blockquote lightgray
table_border_color Table top/bottom border table: border-top, border-bottom #666
table_row_border_color Table row inner bottom border table thead th: border-bottom #ddd
table_row_even_background_color Table Even Row Background Color thead, tfoot, tr:nth-child(even) #eee
base_font_size Base Font Size for All Slide Elements (must be px) html 20px
text_font_size Slide Body Text Font Size .remark-slide-content 1rem
header_h1_font_size h1 Header Text Font Size .remark-slide-content h1 2.75rem
header_h2_font_size h2 Header Text Font Size .remark-slide-content h2 2.25rem
header_h3_font_size h3 Header Text Font Size .remark-slide-content h3 1.75rem
header_background_auto Add background under slide title automatically for h1 header elements. If not enabled, use class: header_background to enable FALSE
header_background_color Background Color for h1 Header with Background .remark-slide-content h1 header_color
header_background_text_color Text Color for h1 Header with Background .remark-slide-content h1 background_color
header_background_padding Padding for h1 Header with Background .remark-slide-content h1 NULL
header_background_content_padding_top Top Padding for Content in Slide with Header with Background .remark-slide-content 7rem
header_background_ignore_classes Slide Classes Where Header with Background will not be Applied .remark-slide-content c(‘normal’, ‘inverse’, ‘title’, ‘middle’, ‘bottom’)
text_slide_number_font_size Slide Number Text Font Size .remark-slide-number 0.9em
text_font_google Use google_font() to specify body font body NULL
text_font_family Body Text Font Family (xaringan default is 'Droid Serif') body Noto Sans
text_font_weight Body Text Font Weight body normal
text_font_url Body Text Font URL(s) @import url() https://fonts.googleapis.com/css?family=Noto+Sans:400,400i,700,700i&display=swap
text_font_family_fallback Body Text Font Fallbacks body -apple-system, BlinkMacSystemFont, avenir next, avenir, helvetica neue, helvetica, Ubuntu, roboto, noto, segoe ui, arial
text_font_base Body Text Base Font (Total Failure Fallback) body sans-serif
header_font_google Use google_font() to specify header font body NULL
header_font_family Header Font Family (xaringan default is 'Yanone Kaffeesatz') h1, h2, h3 Cabin
header_font_weight Header Font Weight h1, h2, h3 600
header_font_url Header Font URL @import url https://fonts.googleapis.com/css?family=Cabin:600,600i&display=swap
code_font_google Use google_font() to specify code font body NULL
code_font_family Code Font Family .remark-code, .remark-inline-code Source Code Pro
code_font_size Code Text Font Size .remark-inline 0.9rem
code_font_url Code Font URL @import url https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700&display=swap
code_font_family_fallback Code Font Fallback .remark-code, .remark-inline-code Menlo, Consolas, Monaco, Liberation Mono, Lucida Console