View source: R/tingle-handler.R
useTingle | R Documentation |
Minimalist and easy to use modals.
useTingle()
tingle(
content = "Hello",
close_button = FALSE,
button_label = "Close",
button_type = "default",
button_position = "right",
session = getDefaultReactiveDomain()
)
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. |
None
useTingle
: Dependencies to include in your UI.
tingle
: Display modals.
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.