screenOutput: Create a screen output element

Description Usage Arguments Details Examples

Description

Insert a screen output element in a shiny app UI. This must be used with a renderUI reactive expression in the app server.

Usage

1
2
3
4
5
6
7
8
9
screenOutput(
  outputId,
  next_label = NULL,
  prev_label = NULL,
  next_condition = NULL,
  prev_condition = NULL,
  class = NULL,
  ...
)

Arguments

outputId

output variable to read the value from

next_label

specific label of the "next" control for this screen. If NULL, use the default one for the current glide.

prev_label

specific label of the "back" control for this screen. If NULL, use the default one for the current glide.

next_condition

condition for the "next" control to be enabled. Same syntax as shiny::conditionalPanel.

prev_condition

condition for the "back" control to be enabled. Same syntax as shiny::conditionalPanel.

class

screen CSS classes. glide__slide is automatically added.

...

other arguments to pass to the container tag function.

Details

Important : for this to work, you have to add a outputOptions(output, id, suspendWhenHidden = FALSE) in your app server. See example.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
## Only run examples in interactive R sessions
if (interactive()) {

ui <- fixedPage(
 h3("Simple shinyglide app"),
 glide(
    screen(
      p("First screen."),
    ),
    screenOutput("screen"),
    screen(
      p("Final screen."),
    )
  )
)

server <- function(input, output, session) {

  output$screen <- renderUI({
    p("Second screen.")
  })
  outputOptions(output, "screen", suspendWhenHidden = FALSE)

}

shinyApp(ui, server)

}

shinyglide documentation built on June 11, 2021, 5:15 p.m.