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