shinyglide v0.1.2

0

Monthly downloads

0th

Percentile

Glide Component for Shiny Applications

Insert Glide JavaScript component into Shiny applications for carousel or assistant-like user interfaces.

Readme

shinyglide

Lifecycle: stable CRAN status CRAN downloads Travis build status

shinyglide is an R package which provides carousel-like or assistant-like components to shiny applications, thanks to the Glide JavaScript library.

It allows to create this sort of app (live example) :

Or can be integrated into an existing app to create an "assistant-like" interface (live example):

The package is still in experimental stage, breaking changes could happen.

Features

  • Responsive, navigation by mouse, keyboard, swiping
  • Controls are completely customizable (live example)
  • Next and Back controls can be disabled until an input condition is met (same syntax as shiny::conditionalPanel)
  • "Screens" can be generated or hidden depending on user inputs. Loading time are taken into accounts (disabled Next button and customizable animation)
  • Integration with Shiny modal dialogs (live example)
  • Multiple glides per app (live example)

Installation

You can install the stable version with :

install.packages("shinyglide")

And the development version with :

remotes::install_github("juba/shinyglide")

Usage

A shinyglide component is created with the glide() function. This component is then divided intro screens with the screen() function.

Here is the code of a very basic app (live example):

library(shiny)
library(shinyglide)

ui <- fixedPage(style = "max-width: 500px;",
  titlePanel("Simple shinyglide app"),

  glide(
    height = "350px",
    screen(
      p("This is a very simple shinyglide application."),
      p("Please click on Next to go to the next screen.")
    ),
    screen(
      p("Please choose a value."),
      numericInput("n", "n", value = 10, min = 10)
    ),
    screen(
      p("And here is the result."),
      plotOutput("plot")
    )
  )
)


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

  output$plot <- renderPlot({
    hist(
      rnorm(input$n),
      main = paste("n =", input$n),
      xlab = ""
    )
  })

}

shinyApp(ui, server)

For more information, see the three available vignettes :

Credits

Functions in shinyglide

Name Description
firstButton Create a glide control only shown on first or last screen
glide Glide component creation
screenOutput Create a screen output element
screen Screen creation
nextButton Code for the default controls
glideControls Default controls layout
No Results!

Vignettes of shinyglide

Name
a_introduction.Rmd
b_conditionals.Rmd
c_custom_controls.Rmd
No Results!

Last month downloads

Details

Type Package
Date 2019-10-12
License GPL (>= 3)
VignetteBuilder knitr
URL https://juba.github.io/shinyglide/, https://github.com/juba/shinyglide
BugReports https://github.com/juba/shinyglide/issues
Encoding UTF-8
LazyData true
RoxygenNote 6.1.1
NeedsCompilation no
Packaged 2019-10-12 16:22:38 UTC; julien
Repository CRAN
Date/Publication 2019-10-12 17:00:03 UTC

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/shinyglide)](http://www.rdocumentation.org/packages/shinyglide)