Description Usage Arguments Examples
Initialize with use_notie
in UI before using notie
server-side.
Close all notifications with notie_close
.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
text |
Text to display. |
time |
Delay for closing notification in seconds (s). |
type |
Type of notification: |
position |
Where to display notification: |
session |
Shiny session. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | library(shiny)
library(shinypop)
ui <- fluidPage(
tags$h2("notie example"),
use_notie(),
radioButtons(
inputId = "type",
label = "Type:",
choices = c("info", "neutral",
"success", "error",
"warning"),
inline = TRUE
),
radioButtons(
inputId = "position",
label = "Position:",
choices = c("bottom", "top"),
inline = TRUE
),
actionButton(
inputId = "show",
label = "Show notification",
width = "100%"
)
)
server <- function(input, output, session) {
observeEvent(input$show, {
notie(
text = "Hello world!",
type = input$type,
position = input$position
)
})
}
if (interactive())
shinyApp(ui, server)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.