Alerts and Notifications"

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

standby offers several types of alerts, notifications and tooltips. This document is a quickstart guide for using standby in your Shiny applications. Let us look at a simple example below:

library(shiny)
library(standby)

ui <- fluidPage(

  useToast(), # include dependencies
  actionButton(inputId = "btn",
               label   = "iziToast Demo")

)

server <- function(input, output, session) {

  observeEvent(input$btn, {
    # display toast notification
    toast("Hey there!", "Thank you for exploring buzz!")
  })
}

shinyApp(ui, server)

To use alerts or notifications from buzz in your Shiny application, follow the below steps:

Details

The below table displays the dependency and rendering functions along with references:

index <- 1:8
dependency <- c("`useAlertify()`", "`useAlertify()`", "`useBootBox()`", "`useMicroTip()`", 
                "`useNS()`", "`useNotify()`", "`useTingle()`", "`useToast()`")
renderer <- c("`alertify_alert()`", "`alertify_notify()`", "`bootBox()`", "`microTip()`",
              "`notice()`", "`notify()`", "`tingle()`", "`toast()`")
reference <- c("https://github.com/MohammadYounes/AlertifyJS",
               "https://github.com/MohammadYounes/AlertifyJS",
               "https://github.com/bootboxjs/bootbox",
               "https://github.com/ghosh/microtip",
               "https://tympanus.net/Development/NotificationStyles/",
               "https://github.com/sciactive/pnotify",
               "https://github.com/robinparisi/tingle",
              "https://github.com/marcelodolza/iziToast")
ref <- data.frame(Index = index, Dependency = dependency, Render = renderer, Reference = reference)
kableExtra::kable(ref)

Visit the documentation to learn how to customize the alerts and notifications.



Try the standby package in your browser

Any scripts or data that you put into this service are public.

standby documentation built on Oct. 30, 2024, 9:30 a.m.