f7Notif | R Documentation |
Notification with title, text, icon and more.
f7Notif(
text,
icon = NULL,
title = NULL,
titleRightText = NULL,
subtitle = NULL,
closeTimeout = 5000,
closeButton = FALSE,
closeOnClick = TRUE,
swipeToClose = TRUE,
...,
session = shiny::getDefaultReactiveDomain()
)
text |
Notification content. |
icon |
Notification icon. |
title |
Notification title. |
titleRightText |
Notification right text. |
subtitle |
Notification subtitle |
closeTimeout |
Time before notification closes. |
closeButton |
Whether to display a close button. FALSE by default. |
closeOnClick |
Whether to close the notification on click. TRUE by default. |
swipeToClose |
If enabled, notification can be closed by swipe gesture. |
... |
Other options. See https://framework7.io/docs/notification.html. |
session |
shiny session. |
if (interactive()) {
library(shiny)
library(shinyMobile)
shinyApp(
ui = f7Page(
title = "My app",
f7SingleLayout(
navbar = f7Navbar(title = "f7Notif"),
f7Block(f7Button(inputId = "goButton", "Go!"))
)
),
server = function(input, output, session) {
observeEvent(input$goButton, {
f7Notif(
text = "test",
icon = f7Icon("bolt_fill"),
title = "Notification",
subtitle = "A subtitle",
titleRightText = "now"
)
})
}
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.