screen: Screen creation

Description Usage Arguments Details See Also Examples

View source: R/elements.R

Description

Insert a new screen into a glide component.

Usage

1
2
3
4
5
6
7
8
screen(
  ...,
  next_label = NULL,
  previous_label = NULL,
  next_condition = NULL,
  previous_condition = NULL,
  class = NULL
)

Arguments

...

content of the screen.

next_label

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

previous_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.

previous_condition

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

class

screen CSS classes. glide__slide is automatically added.

Details

This function inserts a new "screen" into an existing glide component. It can only be used inside a glide() call, in a shiny app UI.

See Also

glide

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
## Only run examples in interactive R sessions
if (interactive()) {

ui <- fixedPage(
 h3("Simple shinyglide app"),
 glide(
    screen(
      next_label = "Go next",
      next_condition = "input.x > 0",
      p("First screen."),
      numericInput("x", "x", value = 0)
    ),
    screen(
      p("Final screen."),
    )
  )
)

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

shinyApp(ui, server)

}

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