glide: Glide component creation

Description Usage Arguments See Also Examples

View source: R/elements.R

Description

Insert a glide component in the current shiny app UI

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
glide(
  ...,
  id = NULL,
  next_label = paste("Next", shiny::icon("chevron-right", lib = "glyphicon")),
  previous_label = paste(shiny::icon("chevron-left", lib = "glyphicon"), "Back"),
  loading_label = span(span(class = "shinyglide-spinner"), span("Loading")),
  loading_class = "loading",
  disable_type = c("disable", "hide"),
  height = "100%",
  keyboard = TRUE,
  custom_controls = NULL,
  controls_position = c("bottom", "top")
)

Arguments

...

content of the glide.

id

optional HTML id of the glide root element.

next_label

label to be used in the "next" control.

previous_label

label to be used in the "back" control.

loading_label

label to be used in the "next" control when the next screen is still loading.

loading_class

class to add to the "next" control when the next screen is still loading.

disable_type

either to "disable" or "hide" the next or back control when it is disabled by a condition.

height

height of the glide (something like "400px" or "100%").

keyboard

set this to FALSE to disable keyboard navigation.

custom_controls

custom HTML or shiny tags to be used for the controls. If 'NULL“, use the default ones.

controls_position

either to place the default or custom controls on "top" or "bottom" of the glide.

See Also

screen nextButton prevButton firstButton lastButton

Examples

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

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

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

shinyApp(ui, server)

}

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