View source: R/fullscreen_this.R
fullscreen_this | R Documentation |
Enable fullscreen for a specific item
fullscreen_this(ui_element, click_id = NULL, bg_color = "#fff", cursor = TRUE)
ui_element |
A UI element that should be displayed fullscreen. |
click_id |
Id of the item that triggers the fullscreen view. By default, it is the id of |
bg_color |
Background color when item is displayed fullscreen. Default is white. |
cursor |
Display a special "zoom-in" cursor when hovering the element?
Default is |
Enables the selected element to be displayed in fullscreen mode.
if (interactive()) {
### Only works in browser
library(shiny)
ui <- fluidPage(
actionButton("test", "test"),
fullscreen_this(plotOutput("plot"))
)
server <- function(input, output, session) {
output$plot <- renderPlot(plot(mtcars))
}
shinyApp(ui, server, options = list(launch.browser = TRUE))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.