useNS {standby} | R Documentation |
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)
}
[Package standby version 0.1.0 Index]