embed_xaringan: Embed a xaringan presentation in a web page

View source: R/share_again.R

embed_xaringanR Documentation

Embed a xaringan presentation in a web page

Description

Embed xaringan slides in any HTML web page, such as a blogdown page or an R Markdown website. The presentation is embedded in a responsive aspect ratio container for seamless integration with your web page. This feature works best when combined with use_share_again(), but embed_xaringan() can be used for any xaringan presentation.

Usage

embed_xaringan(
  url,
  ratio = "16:9",
  border = "2px solid currentColor",
  max_width = NULL,
  margin = "1em auto",
  style = NULL
)

Arguments

url

The URL or path to the presentation to embed.

ratio

The ratio of the presentation, either as "width:height" or width/height, e.g. "16:9" or 1.7777.

border

The border style of the embedded ⁠<iframe>⁠. For no border, use "none".

max_width

The max width of the ⁠<iframe>⁠, in a valid CSS units.

margin

The margin placed around the embedded ⁠<iframe>⁠.

style

Additional CSS style property value pairs, e.g. c("padding-left: 1em", "padding-right: 1em").

Value

An htmltools::tagList() with the HTML dependencies required for share again.

See Also

use_share_again()

Examples

# In your slides call
use_share_again()


xaringanExtra documentation built on May 29, 2024, 4:17 a.m.