View source: R/f7PhotoBrowser.R
| f7PhotoBrowser | R Documentation | 
A nice photo browser.
f7PhotoBrowser(
  photos,
  theme = c("light", "dark"),
  type = c("popup", "standalone", "page"),
  ...,
  id = NULL,
  session = shiny::getDefaultReactiveDomain()
)
photos | 
 List of photos  | 
theme | 
 Browser theme: choose either light or dark.  | 
type | 
 Browser type: choose among   | 
... | 
 Other options to pass to the photo browser. See https://framework7.io/docs/photo-browser#photo-browser-parameters for more details.  | 
id | 
 Unique id. Useful to leverage updateF7Entity on the server.  | 
session | 
 Shiny session object.  | 
library(shiny)
library(shinyMobile)
app <- shinyApp(
  ui = f7Page(
    title = "f7PhotoBrowser",
    f7SingleLayout(
      navbar = f7Navbar(title = "f7PhotoBrowser"),
      f7Block(
        f7Button(inputId = "togglePhoto", "Open photo")
      )
    )
  ),
  server = function(input, output, session) {
    observeEvent(input$togglePhoto, {
      f7PhotoBrowser(
        id = "photobrowser1",
        theme = "dark",
        type = "page",
        photos = list(
          list(url = "https://cdn.framework7.io/placeholder/sports-1024x1024-1.jpg"),
          list(url = "https://cdn.framework7.io/placeholder/sports-1024x1024-2.jpg"),
          list(url = "https://cdn.framework7.io/placeholder/sports-1024x1024-3.jpg",
               caption = "Me cycling")
        ),
        thumbs = c(
          "https://cdn.framework7.io/placeholder/sports-1024x1024-1.jpg",
          "https://cdn.framework7.io/placeholder/sports-1024x1024-2.jpg",
          "https://cdn.framework7.io/placeholder/sports-1024x1024-3.jpg"
        )
      )
    })
  }
)
if (interactive() || identical(Sys.getenv("TESTTHAT"), "true")) app
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.