# NOT RUN {
if (interactive()) {
library(shiny)
library(shinyMobile)
shinyApp(
ui = f7Page(
title = "My app",
f7SingleLayout(
navbar = f7Navbar(title = "f7Toast"),
f7Button(inputId = "toast", label = "Open Toast")
)
),
server = function(input, output, session) {
observeEvent(input$toast, {
f7Toast(
session,
position = "top",
text = "I am a toast. Eat me!"
)
})
}
)
}
# }
Run the code above in your browser using DataLab