if (interactive()) {
library(shiny)
library(shinyMobile)
shinyApp(
ui = f7Page(
title = "Hide navbar",
f7SingleLayout(
navbar = f7Navbar("Hide/Show navbar"),
f7Segment(
f7Button(inputId = "hide", "Hide navbar", color = "red"),
f7Button(inputId = "show", "Show navbar", color = "green"),
)
)
),
server = function(input, output, session) {
observeEvent(input$hide, {
f7HideNavbar()
})
observeEvent(input$show, {
f7ShowNavbar()
})
}
)
}
if (interactive()) {
library(shiny)
library(shinyMobile)
shinyApp(
ui = f7Page(
title = "f7Popover",
f7SingleLayout(
navbar = f7Navbar(title = "f7Popover"),
f7PopoverTarget(
f7Button(
inputId = "goButton",
"Go!"
),
targetId = "test"
),
br(),
br(),
f7PopoverTarget(
f7Slider(
inputId = "slider",
label = "Value",
value = 10,
min = 0,
max = 20
),
targetId = "test2"
)
)
),
server = function(input, output, session) {
observe({
f7Popover(
targetId = "test",
content = "This is a f7Button"
)
})
observe({
f7Popover(
targetId = "test2",
content = "This is a f7Slider"
)
})
}
)
}
create_manifest(
path = tempdir(),
name = "My App",
shortName = "My App",
description = "What it does!",
lang = "en-US",
startUrl = "https://www.google.com/",
display = "standalone",
background_color = "#3367D6",
theme_color = "#3367D6",
icon = data.frame(
src = "icons/128x128.png",
sizes = "128x128", 10,
types = "image/png"
)
)
Run the code above in your browser using DataLab