Description Usage Arguments Examples
Initialize with use_notie
in UI before using notie_confirm
server-side.
Retrieve value server-side with input$<inputId>
.
1 2 3 4 5 6 7 8 | notie_confirm(
inputId,
text,
label_submit = "Ok",
label_cancel = "Cancel",
position = c("top", "bottom"),
session = shiny::getDefaultReactiveDomain()
)
|
inputId |
The |
text |
Text to display. |
label_submit |
Submit button label. |
label_cancel |
Cancel button label. |
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 | if (interactive()) {
library(shiny)
ui <- fluidPage(
use_notie(),
tags$h2("notie.js confirmation pop-up"),
actionButton("show", "Ask for confirmation"),
verbatimTextOutput("result")
)
server <- function(input, output, session) {
observeEvent(input$show, {
notie_confirm(
inputId = "confirm",
text = "Do you want to confirm?",
label_submit = "Sure!",
label_cancel = "Nope!"
)
})
output$result <- renderPrint({
input$confirm
})
}
shinyApp(ui, server)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.