glide: Glide component creation

View source: R/elements.R

glideR Documentation

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%",
  keyboard = TRUE,
  swipe = 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.

swipe

set this to FALSE to disable swipe 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

## 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 Feb. 16, 2023, 9:18 p.m.