# NOT RUN {
if(interactive()){
texts <- c("p1", "p2", "", "p4", "p5")
hrefs <- c("https://unsplash.it/1200/768.jpg?image=251",
"https://unsplash.it/1200/768.jpg?image=252",
"",
"https://unsplash.it/1200/768.jpg?image=254",
"https://unsplash.it/1200/768.jpg?image=255")
images <- c("https://unsplash.it/600.jpg?image=251",
"https://unsplash.it/600.jpg?image=252",
"https://unsplash.it/600.jpg?image=253",
"https://unsplash.it/600.jpg?image=254",
"https://unsplash.it/600.jpg?image=255")
library(shiny)
ui <- fluidPage(
column(
6,
gallery(texts = texts, hrefs = hrefs, images = images, title = "Default gallery"),
spsHr(),
gallery(texts = texts, hrefs = hrefs, images = images,
image_frame_size = 2, title = "Photo size"),
spsHr(),
gallery(texts = texts, hrefs = hrefs, images = images,
enlarge = TRUE, title = "Inline enlarge"),
spsHr(),
gallery(
texts = texts, hrefs = hrefs, images = images,
enlarge = TRUE, title = "Modal enlarge",
enlarge_method = "modal"
)
)
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
}
# }
Run the code above in your browser using DataLab