View source: R/fullscreen_button.R
fullscreen_button | R Documentation |
Button that toggles fullscreen
fullscreen_button(
id,
label,
class = NULL,
type = "default",
target = NULL,
icon = NULL
)
id |
Id of the button |
label |
Label of the button |
class |
Additional classes to give to the button |
type |
Type of the button ("info", "danger", etc.) |
target |
Id of the element to put on fullscreen. If |
icon |
Icon to add before the label on the button |
Put an element or the whole page on fullscreen
if (interactive()) {
### Only works in browser
library(shiny)
ui <- fluidPage(
fullscreen_button(id = "toggle_fs", "Enter/Quit fullscreen", target = "plot"),
plotOutput("plot")
)
server <- function(input, output){
output$plot <- renderPlot(plot(mtcars))
}
shinyApp(ui, server)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.