Replace UI Elements in teal UI objects
Usage
modify_title(x, title = "teal app", favicon = NULL)
modify_header(x, element = tags$p())
modify_footer(x, element = tags$p())Arguments
- x
(
teal_app) Ateal_appobject created using theinitfunction.- title
(
shiny.tagorcharacter(1)) The new title to be used.- favicon
(
character) The path for the icon for the title. The image/icon path can be remote or the static path accessible byshiny, like thewww/. If the favicon isNULLtheteallogo will be used as the favicon.- element
Replacement UI element (shiny tag or HTML)
Examples
app <- init(
data = teal_data(IRIS = iris, MTCARS = mtcars),
modules = modules(example_module())
) |>
modify_title(title = "Custom title")
if (interactive()) {
shinyApp(app$ui, app$server)
}
app <- init(
data = teal_data(IRIS = iris),
modules = modules(example_module())
) |>
modify_header(element = tags$div(h3("Custom header")))
if (interactive()) {
shinyApp(app$ui, app$server)
}
app <- init(
data = teal_data(IRIS = iris),
modules = modules(example_module())
) |>
modify_footer(element = "Custom footer")
if (interactive()) {
shinyApp(app$ui, app$server)
}