if(interactive()){
library(shiny)
library(shinyMobile)
shinyApp(
ui = f7Page(
title = "Single layout",
f7SingleLayout(
navbar = f7Navbar(
title = "Single Layout",
hairline = FALSE,
shadow = TRUE
),
toolbar = f7Toolbar(
position = "bottom",
f7Link(label = "Link 1", href = "https://www.google.com"),
f7Link(label = "Link 2", href = "https://www.google.com")
),
# main content
f7Shadow(
intensity = 10,
hover = TRUE,
f7Card(
title = "Card header",
f7Slider("obs", "Number of observations", 0, 1000, 500),
plotOutput("distPlot"),
footer = tagList(
f7Button(color = "blue", label = "My button", href = "https://www.google.com"),
f7Badge("Badge", color = "green")
)
)
)
)
),
server = function(input, output) {
output$distPlot <- renderPlot({
dist <- rnorm(input$obs)
hist(dist)
})
}
)
}
Run the code above in your browser using DataLab