Adds a landing popup to the teal
app. This popup will be shown when the app starts.
The dialog must be closed by the app user to proceed to the main application.
Usage
add_landing_modal(
x,
title = NULL,
content = NULL,
footer = modalButton("Accept"),
...
)
Arguments
- x
(
teal_app
) Ateal_app
object created using theinit
function.- title
An optional title for the dialog.
- content
(
character(1)
,shiny.tag
orshiny.tag.list
) with the content of the popup.UI for footer. Use
NULL
for no footer.- ...
Additional arguments to
shiny::modalDialog()
.
Examples
app <- init(
data = teal_data(IRIS = iris, MTCARS = mtcars),
modules = modules(example_module())
) |>
add_landing_modal(
title = "Welcome",
content = "This is a landing popup.",
buttons = modalButton("Accept")
)
if (interactive()) {
shinyApp(app$ui, app$server)
}