Learn R Programming

shinyMobile (version 0.9.1)

f7Swiper: Framework7 swiper

Description

f7Swiper creates a Framework7 swiper container (like carousel).

Usage

f7Swiper(
  ...,
  id,
  options = list(speed = 400, spaceBetween = 50, slidesPerView = "auto", centeredSlides
    = TRUE, pagination = TRUE)
)

Arguments

...

Slot for f7Slide.

id

Swiper unique id.

options

Other options. Expect a list.

Author

David Granjon, dgranjon@ymail.com

Examples

Run this code
if(interactive()){
 library(shiny)
 library(shinyMobile)

 timeline <- f7Timeline(
  sides = TRUE,
  f7TimelineItem(
   "Another text",
   date = "01 Dec",
   card = FALSE,
   time = "12:30",
   title = "Title",
   subtitle = "Subtitle",
   side = "left"
  ),
  f7TimelineItem(
   "Another text",
   date = "02 Dec",
   card = TRUE,
   time = "13:00",
   title = "Title",
   subtitle = "Subtitle"
  ),
  f7TimelineItem(
   "Another text",
   date = "03 Dec",
   card = FALSE,
   time = "14:45",
   title = "Title",
   subtitle = "Subtitle"
  )
 )

 shiny::shinyApp(
   ui = f7Page(
    title = "Swiper",
    f7SingleLayout(
     navbar = f7Navbar(title = "f7Swiper"),
     f7Swiper(
     id = "my-swiper",
     f7Slide(
      timeline
     ),
     f7Slide(
      f7Toggle(
       inputId = "toggle",
       label = "My toggle",
       color = "pink",
       checked = TRUE
      ),
      verbatimTextOutput("test")
     )
    )
    )
   ),
   server = function(input, output) {
    output$test <- renderPrint(input$toggle)
   }
 )
}

Run the code above in your browser using DataLab