fullscreen_button: Button that toggles fullscreen

View source: R/fullscreen_button.R

fullscreen_buttonR Documentation

Button that toggles fullscreen

Description

Button that toggles fullscreen

Usage

fullscreen_button(
  id,
  label,
  class = NULL,
  type = "default",
  target = NULL,
  icon = NULL
)

Arguments

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 NULL, the whole page is put on fullscreen.

icon

Icon to add before the label on the button

Value

Put an element or the whole page on fullscreen

Examples

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)
}

etiennebacher/shinyfullscreen documentation built on May 8, 2023, 10:27 p.m.