fullscreen_this: Enable fullscreen for a specific item

Description Usage Arguments Value Examples

View source: R/fullscreen_this.R

Description

Enable fullscreen for a specific item

Usage

1
fullscreen_this(ui_element, click_id = NULL, bg_color = "#fff")

Arguments

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 ui_element, i.e clicking on the element shows it on fullscreen. You can specify the id of a button for instance, so that clicking on this button triggers the fullscreen view of ui_element.

bg_color

Background color when item is displayed fullscreen. Default is white.

Value

Enables the selected element to be displayed in fullscreen mode.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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))
}

shinyfullscreen documentation built on Jan. 16, 2021, 5:17 p.m.