| Type: | Package | 
| Title: | Alerts, Notifications and Loading Screen in 'Shiny' | 
| Version: | 0.2.0 | 
| Description: | Easily create alerts, notifications, modals, info tips and loading screens in 'Shiny'. Includes several options to customize alerts and notifications by including text, icons, images and buttons. When wrapped around a 'Shiny' output, loading screen is automatically displayed while the output is being recalculated. | 
| Depends: | R(≥ 3.3) | 
| Imports: | grDevices, htmltools, shiny | 
| Suggests: | rmarkdown, kableExtra, knitr, testthat (≥ 3.0.0), covr | 
| License: | GPL (≥ 3) | 
| URL: | https://standby.rsquaredacademy.com/, https://github.com/rsquaredacademy/standby | 
| BugReports: | https://github.com/rsquaredacademy/standby/issues | 
| Encoding: | UTF-8 | 
| RoxygenNote: | 7.3.2 | 
| VignetteBuilder: | knitr | 
| Config/testthat/edition: | 3 | 
| NeedsCompilation: | no | 
| Packaged: | 2024-10-28 10:47:20 UTC; HP | 
| Author: | Aravind Hebbali [aut, cre], Zong Bin [ctb, cph] (Author of Three Dots), Tobias Ahlin [ctb, cph] (Author of SpinKit), https://github.com/RIDICS [ctb, cph] (CSS loader code), Raphael Fabini [ctb, cph] (Author of included CSS loader code), Luke Hass [ctb, cph] (Author of included CSS loader code), Mohammad Younes [ctb, cph] (Author of Alertify), Nick Payne [ctb, cph] (Author of BootBox), Indrashish Ghosh [ctb, cph] (Author of MicroTip), https://github.com/codrops [ctb, cph] (Author of Notification Styles), Hunter Perrin [ctb, cph] (Author of PNotify), Robin Parisi [ctb, cph] (Author of Tingle), Marcelo Dolza [ctb, cph] (Author of iziToast) | 
| Maintainer: | Aravind Hebbali <hebbali.aravind@gmail.com> | 
| Repository: | CRAN | 
| Date/Publication: | 2024-10-28 11:50:32 UTC | 
standby package
Description
Loading screens for Shiny.
Details
See the README on GitHub
Author(s)
Maintainer: Aravind Hebbali hebbali.aravind@gmail.com
Other contributors:
- Zong Bin (Author of Three Dots) [contributor, copyright holder] 
- Tobias Ahlin (Author of SpinKit) [contributor, copyright holder] 
- https://github.com/RIDICS (CSS loader code) [contributor, copyright holder] 
- Raphael Fabini (Author of included CSS loader code) [contributor, copyright holder] 
- Luke Hass (Author of included CSS loader code) [contributor, copyright holder] 
- Mohammad Younes (Author of Alertify) [contributor, copyright holder] 
- Nick Payne (Author of BootBox) [contributor, copyright holder] 
- Indrashish Ghosh (Author of MicroTip) [contributor, copyright holder] 
- https://github.com/codrops (Author of Notification Styles) [contributor, copyright holder] 
- Hunter Perrin (Author of PNotify) [contributor, copyright holder] 
- Robin Parisi (Author of Tingle) [contributor, copyright holder] 
- Marcelo Dolza (Author of iziToast) [contributor, copyright holder] 
See Also
Useful links:
- Report bugs at https://github.com/rsquaredacademy/standby/issues 
Preview Alerts
Description
Preview different types of alerts/notifications.
Preview different types of spinners/loaders.
Usage
previewAlerts(type = "toast")
previewSpinners(spinner = "threedots")
Arguments
| type | Type of alert/notification. Valid values are: 
 | 
| spinner | Type of spinner. The following spinners are available: 
 | 
Value
None
None
standby dependencies
Description
Attaches custom script and stylesheet.
Usage
standbyDeps()
Alertify
Description
Pretty browser alerts and notifications.
Usage
useAlertify()
alertify_alert(
  title = "Alert Title",
  message = "Alert Message",
  type = "success",
  btn_label = "OK",
  transition = "pulse",
  transition_off = FALSE,
  closable = TRUE,
  auto_reset = FALSE,
  frameless = FALSE,
  maximizable = FALSE,
  modal = FALSE,
  movable = FALSE,
  move_bounded = TRUE,
  overflow = FALSE,
  padding = TRUE,
  pinnable = FALSE,
  resizeable = FALSE,
  start_maximized = FALSE,
  session = getDefaultReactiveDomain()
)
alertify_notify(
  message = "Alert Message",
  type = "success",
  delay = 5,
  position = "bottom-right",
  session = getDefaultReactiveDomain()
)
Arguments
| title | Dialog title. | 
| message | Dialog contents. | 
| type | Dialog type. Defaults to  
 | 
| btn_label | The  | 
| transition | Transition effect to be used when showing/hiding the dialog. Defaults to  
 | 
| transition_off | Logical; if  | 
| closable | Logical; if  | 
| auto_reset | Logical; if  | 
| frameless | Logical; if  | 
| maximizable | Logical; if  | 
| modal | Logical; if  | 
| movable | Logical; if  | 
| move_bounded | Logical; if  | 
| overflow | Logical; if  | 
| padding | Logical; if  | 
| pinnable | Logical; if  | 
| resizeable | Logical; if  | 
| start_maximized | Logical; if  | 
| session | Shiny session object. | 
| delay | The time (in seconds) to wait before the notification is auto-dismissed.  | 
| position | Position of the notification. Defaults to  
 | 
Value
None
Functions
-  useAlertify: Dependencies to include in your UI.
-  alertify_alert: Display alerts.
-  alertify_notify: Display notifications.
Examples
# Example 1: Alert
if (interactive()) {
library(shiny)
library(standby)
ui <- fluidPage(
  useAlertify(), # include dependencies
  actionButton(inputId = "btn",
               label   = "Alert Demo")
)
server <- function(input, output, session) {
  observeEvent(input$btn, {
    # display alert
    alertify_alert("Hey there!", "Thank you for exploring standby!")
  })
}
shinyApp(ui, server)
}
# Example 2: Notification
if (interactive()) {
library(shiny)
library(standby)
ui <- fluidPage(
  useAlertify(), # include dependencies
  actionButton(inputId = "btn",
               label   = "Notification Demo")
)
server <- function(input, output, session) {
  observeEvent(input$btn, {
    # display notification
    alertify_notify("Hey there! Thank you for exploring standby!")
  })
}
shinyApp(ui, server)
}
BootBox
Description
Bootstrap modals made easy.
Usage
useBootBox()
bootBox(
  title = "Your title",
  message = "Your message here...",
  size = "small",
  close_on_escape = TRUE,
  show = TRUE,
  backdrop = NULL,
  close_button = TRUE,
  animate = TRUE,
  class = NULL,
  session = getDefaultReactiveDomain()
)
Arguments
| title | Adds a header to the dialog. | 
| message | Text displayed in the dialog. | 
| size | Adds the relevant Bootstrap modal size class to the dialog wrapper. Valid values are: 
 | 
| close_on_escape | Logical; if  | 
| show | Logical; if  | 
| backdrop | Logical; if  
 | 
| close_button | Logical; if  | 
| animate | Logical; if  | 
| class | Custom CSS class (using Animate.css). | 
| session | Shiny session object. | 
Value
None
Functions
-  useBootBox: Dependencies to include in your UI.
-  bootBox: Display modals.
Examples
if (interactive()) {
library(shiny)
library(standby)
ui <- fluidPage(
  useBootBox(), # include dependencies
  actionButton(inputId = "btn",
               label   = "BootBox Demo")
)
server <- function(input, output, session) {
  observeEvent(input$btn, {
    # display modal
    bootBox("Hey there!", "Thank you for exploring standby!")
  })
}
shinyApp(ui, server)
}
CSS Loaders
Description
Simple CSS loaders
Usage
useLoaders()
loaders(uiOutput, type = "default", style = NULL, text = NULL)
Arguments
| uiOutput | An output element to be wrapped within a loader. | 
| type | The type of loader to use. Visit https://css-loader.raphaelfabeni.com/ for details. 
 | 
| style | Custom styling for the loaders. | 
| text | Custom text. Available only for the following types: 
 | 
Value
None
Functions
-  useLoaders: Dependencies to include in your UI.
-  loaders: Display loading animation.
Examples
if (interactive()) {
  library(shiny)
  shinyApp(
    ui = fluidPage(
      useLoaders(),
      actionButton("render", "Render"),
      loaders(uiOutput = plotOutput("plot"),
              type = "default",
              style = "half",
              text = "Loading...")
    ),
    server = function(input, output) {
      output$plot <- renderPlot({
        input$render
        Sys.sleep(3)
        hist(mtcars$mpg)
      })
    }
  )
}
MicroTip
Description
Minimal CSS only tooltip.
Usage
useMicroTip()
microTip(
  id = NULL,
  tip = "Hey! tooltip!",
  position = "top",
  size = NULL,
  session = getDefaultReactiveDomain()
)
Arguments
| id | The id of the element to attach the tooltip. | 
| tip | Content of the tooltip. | 
| position | Where the tooltip should appear relative to the target element. Defaults to  
 | 
| size | Size of the tooltip. Defaults to  
 | 
| session | Shiny session object. | 
Value
None
Functions
-  useMicroTip: Dependencies to include in your UI.
-  microTip: Add tooltip.
Examples
if (interactive()) {
library(shiny)
library(standby)
ui <- fluidPage(
  useMicroTip(), # include dependencies
  br(), br(), br(), br(),
  actionButton(inputId = "btn",
               label   = "MicroTip Demo")
)
server <- function(input, output, session) {
  # display tooltip
  microTip(id = "btn",
           tip = "Hey there! This is a micro tip!",
           position = "bottom-right")
}
shinyApp(ui, server)
}
Notification Styles
Description
Simple website notifications with effects
Usage
useNS()
notice(
  message = "Hello",
  type = "notice",
  layout = "growl",
  effect = "jelly",
  session = getDefaultReactiveDomain()
)
Arguments
| message | Notification message. | 
| type | Notification type. Defaults to  
 | 
| layout | Notification layout. Defaults to  
 | 
| effect | Notification effect type. Valid values include: 
 | 
| session | Shiny session object. | 
Value
None
Functions
-  useNS: Dependencies to include in your UI.
-  notice: Display notifications.
Examples
if (interactive()) {
library(shiny)
library(standby)
ui <- fluidPage(
  useNS(), # include dependencies
  actionButton(inputId = "btn",
               label   = "Notice Demo")
)
server <- function(input, output, session) {
  observeEvent(input$btn, {
    # display notification
    notice("Hey there! Thank you for exploring standby!")
  })
}
shinyApp(ui, server)
}
PNotify
Description
Beautiful notifications and prompts.
Usage
useNotify()
notify(
  title = "Hey",
  text = NULL,
  type = "notice",
  icon = TRUE,
  delay = 8000,
  hide = TRUE,
  sticker = TRUE,
  closer = TRUE,
  shadow = TRUE,
  mouse_reset = TRUE,
  animation = "fade",
  animate_speed = "normal",
  width = "360px",
  min_height = "16px",
  max_text_height = "200px",
  translucent = FALSE,
  non_blocking = FALSE,
  session = getDefaultReactiveDomain()
)
Arguments
| title | Title of the notice. It can be a string, an element or  | 
| text | Text of the notice. It can be a string, an element or  | 
| type | Type of notice. Defaults to  
 | 
| icon | Logical; if  | 
| delay | Delay in milliseconds before the notice is removed. If set to  | 
| hide | Logical; if  | 
| sticker | Logical; if  | 
| closer | Logical; if  | 
| shadow | Logical; if  | 
| mouse_reset | Logical; if  | 
| animation | The animation to be used while displaying and hiding the notice.  | 
| animate_speed | Speed at which the notice animates in and out. Valid values are: 
 | 
| width | Width of the notice. Default is  | 
| min_height | Minimum height of the notice. Default is  | 
| max_text_height | Maximum height of the text container. Default is  | 
| translucent | Logical; if  | 
| non_blocking | Logical; if  | 
| session | Shiny session object. | 
Value
None
Functions
-  useNotify: Dependencies to include in your UI.
-  notify: Display notifications.
Examples
if (interactive()) {
library(shiny)
library(standby)
ui <- fluidPage(
  useNotify(), # include dependencies
  actionButton(inputId = "btn",
               label   = "PNotify Demo")
)
server <- function(input, output, session) {
  observeEvent(input$btn, {
    # display notification
    notify("Hey there!", "Thank you for exploring standby!")
  })
}
shinyApp(ui, server)
}
SpinKit
Description
Simple CSS spinners.
Usage
useSpinkit()
spinkit(uiOutput, type = "plane", color = "#333", size = "40px")
Arguments
| uiOutput | An output element to be wrapped within a spinner. | 
| type | Type of spinner to use. Valid values are: 
 | 
| color | Color of the spinner. Defaults to  | 
| size | Size of the spinner. Defaults to  | 
Value
None
Functions
-  useSpinkit: Dependencies to include in your UI.
-  spinkit: Display loading animation.
Examples
if (interactive()) {
  library(shiny)
  shinyApp(
    ui = fluidPage(
      useSpinkit(),
      actionButton("render", "Render"),
      spinkit(plotOutput("plot"), type = "circle-fade")
    ),
    server = function(input, output) {
      output$plot <- renderPlot({
        input$render
        Sys.sleep(3)
        hist(mtcars$mpg)
      })
    }
  )
}
Single Element CSS Spinners
Description
A collection of loading spinners animated with CSS
Usage
useSpinners()
spinners(uiOutput, type = 1, color = "#0275d8")
Arguments
| uiOutput | An output element to be wrapped within a spinner. | 
| type | Type of spinner to use. Any integer between  | 
| color | Color of the spinner. Choose between hexadecimal or keyword values. | 
Value
None
Functions
-  useSpinners: Dependencies to include in your UI.
-  spinners: Display loading animation.
Examples
if (interactive()) {
  library(shiny)
  shinyApp(
    ui = fluidPage(
      useSpinners(),
      actionButton("render", "Render"),
      spinners(plotOutput("plot"))
    ),
    server = function(input, output) {
      output$plot <- renderPlot({
        input$render
        Sys.sleep(3)
        hist(mtcars$mpg)
      })
    }
  )
}
Three Dots
Description
Single element CSS loading animation.
Usage
useThreeDots()
threeDots(uiOutput, type = "elastic", color = "#9880ff")
Arguments
| uiOutput | An output element to be wrapped within a loader. | 
| type | The type of animation to use. Visit https://nzbin.github.io/three-dots/ for details. | 
| color | The color of the loader. Choose between hexadecimal, RGB or keyword values. | 
Value
None
Functions
-  useThreeDots: Dependencies to include in your UI.
-  threeDots: Display loading animation.
Examples
if (interactive()) {
  library(shiny)
  shinyApp(
    ui = fluidPage(
      useThreeDots(),
      actionButton("render", "Render"),
      threeDots(plotOutput("plot"))
    ),
    server = function(input, output) {
      output$plot <- renderPlot({
        input$render
        Sys.sleep(3)
        hist(mtcars$mpg)
      })
    }
  )
}
Tingle
Description
Minimalist and easy to use modals.
Usage
useTingle()
tingle(
  content = "Hello",
  close_button = FALSE,
  button_label = "Close",
  button_type = "default",
  button_position = "right",
  session = getDefaultReactiveDomain()
)
Arguments
| content | Content of the modal. | 
| close_button | Logical; if  | 
| button_label | Label of  | 
| button_type | Type of button. Defaults to  
 | 
| button_position | Position of the button inside the modal. Defaults to  
 | 
| session | Shiny session object. | 
Value
None
Functions
-  useTingle: Dependencies to include in your UI.
-  tingle: Display modals.
Examples
if (interactive()) {
library(shiny)
library(standby)
ui <- fluidPage(
  useTingle(), # include dependencies
  actionButton(inputId = "btn",
               label   = "Tingle Demo")
)
server <- function(input, output, session) {
  observeEvent(input$btn, {
    # display modal
    tingle("Hey there!, Thank you for exploring standby!")
  })
}
shinyApp(ui, server)
}
iziToast
Description
Lightweight toast notifications
Usage
useToast()
toast(
  title = "Hey",
  message = NULL,
  type = NULL,
  theme = NULL,
  position = "center",
  duration = 5000,
  progress_bar_color = NULL,
  background_color = NULL,
  max_width = NULL,
  title_color = NULL,
  title_size = NULL,
  title_line_height = NULL,
  message_color = NULL,
  message_size = NULL,
  message_line_height = NULL,
  image = NULL,
  image_width = NULL,
  zindex = 99999,
  layout = 1,
  balloon = FALSE,
  close = TRUE,
  close_on_escape = FALSE,
  close_on_click = FALSE,
  rtl = FALSE,
  display_mode = 0,
  drag_to_close = TRUE,
  pause_on_hover = TRUE,
  reset_on_hover = FALSE,
  progress_bar_easing = "linear",
  overlay = FALSE,
  overlay_close = FALSE,
  overlay_color = "rgba(0, 0, 0, 0.6)",
  animate_inside = TRUE,
  transition_in = "fadeInUp",
  transition_out = "fadeOut",
  session = getDefaultReactiveDomain()
)
Arguments
| title | Title of the toast. | 
| message | Message of toast. | 
| type | Type of notification. Defaults to  
 | 
| theme | Theme of toast. Choose between  | 
| position | Where toast will be shown. Defaults to  
 | 
| duration | Time in milliseconds to close the toast. Defaults to  | 
| progress_bar_color | Progress bar color. Choose between hexadecimal, RGB or keyword values. | 
| background_color | Background color of the toast. Choose between hexadecimal, RGB or keyword values. | 
| max_width | Maximum width of the toast. | 
| title_color | Title color. Choose between hexadecimal, RGB or keyword values. | 
| title_size | Title font size. | 
| title_line_height | Title line height. | 
| message_color | Message color. Choose between hexadecimal, RGB or keyword values. | 
| message_size | Message font size. | 
| message_line_height | Message line height. | 
| image | Cover image. | 
| image_width | Width of cover image. Defaults to  | 
| zindex | The z-index CSS attribute of the toast. Defaults to  | 
| layout | Size of the toast. Choose between  | 
| balloon | Logical; if  | 
| close | Logical; if  | 
| close_on_escape | Logical; if  | 
| close_on_click | Logical; if  | 
| rtl | Logical; if  | 
| display_mode | Rules to show multiple toasts. Default is  
 | 
| drag_to_close | Logical; if  | 
| pause_on_hover | Logical; if  | 
| reset_on_hover | Logical; if  | 
| progress_bar_easing | Animation easing of progress bar. Defaults to  | 
| overlay | Logical; if  | 
| overlay_close | Logical; if  | 
| overlay_color | Overlay background color. Defaults to  | 
| animate_inside | Logical; if  | 
| transition_in | Toast open animation. Defaults to  
 | 
| transition_out | Toast close animation. Defaults to  
 | 
| session | Shiny session object. | 
Value
None
Functions
-  useToast: Dependencies to include in your UI.
-  toast: Display toast notifications.
Examples
if (interactive()) {
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 standby!")
  })
}
shinyApp(ui, server)
}
Loading Visualization
Description
Loading bars and spinners.
Usage
useVizLoad()
vizLoad(
  uiOutput,
  type = "bars",
  size = "large",
  color = NULL,
  add_label = FALSE,
  label = "Loading..."
)
Arguments
| uiOutput | An output element to be wrapped within a spinner. | 
| type | The type of bar/spinner to use. Valid values are: 
 | 
| size | The size of the bar/spinner. Valid values are: 
 | 
| color | The color of the bar/spinner. Choose between hexadecimal, RGB or keyword values. | 
| add_label | Logical; if  | 
| label | The label to be displayed below the bar/spinner.  | 
Value
None
Functions
-  useVizLoad: Dependencies to include in your UI.
-  vizLoad: Display loading animation.
Examples
if (interactive()) {
  library(shiny)
  shinyApp(
    ui = fluidPage(
      useVizLoad(),
      actionButton("render", "Render"),
      vizLoad(plotOutput("plot"))
    ),
    server = function(input, output) {
      output$plot <- renderPlot({
        input$render
        Sys.sleep(3)
        hist(mtcars$mpg)
      })
    }
  )
}