Learn R Programming

shinyMobile (version 0.7.0)

f7Swiper: Create a Framework7 swiper

Description

Build a Framework7 swiper (like carousel)

Usage

f7Swiper(
  ...,
  id,
  spaceBetween = 50,
  slidePerView = "auto",
  centered = TRUE,
  speed = 400
)

Arguments

...

Slot for f7Slide.

id

Swiper unique id.

spaceBetween

Space between slides. 50 by default. Only if pagination is TRUE.

slidePerView

Number of slides at a time. Only if pagination is TRUE. Set to "auto" by default.

centered

Whether to center slides. Only if pagination is TRUE.

speed

Slides speed. Numeric.

Examples

Run this code
# NOT RUN {
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 = "My app",
    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