shinyglide (version 0.1.2)

glide: Glide component creation

Description

Insert a glide component in the current shiny app UI

Usage

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%",
  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%").

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

Run this code
# NOT RUN {
## 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)

}

# }

Run the code above in your browser using DataLab