f7Notif {shinyMobile}R Documentation

Framework7 notification

Description

Notification with title, text, icon and more.

Usage

f7Notif(
  text,
  icon = NULL,
  title = NULL,
  titleRightText = NULL,
  subtitle = NULL,
  closeTimeout = 5000,
  closeButton = FALSE,
  closeOnClick = TRUE,
  swipeToClose = TRUE,
  ...,
  session = shiny::getDefaultReactiveDomain()
)

Arguments

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.

Examples

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"
        )
      })
    }
  )
}

[Package shinyMobile version 2.0.0 Index]