View source: R/shinywrappers.R
renderUI | R Documentation |
Renders reactive HTML using the Shiny UI library.
renderUI(expr, env = parent.frame(), quoted = FALSE, outputArgs = list())
expr |
An expression that returns a Shiny tag object, |
env |
The parent environment for the reactive expression. By default,
this is the calling environment, the same as when defining an ordinary
non-reactive expression. If |
quoted |
If it is |
outputArgs |
A list of arguments to be passed through to the implicit
call to |
The corresponding HTML output tag should be div
and have the CSS class
name shiny-html-output
(or use uiOutput()
).
uiOutput()
## Only run examples in interactive R sessions
if (interactive()) {
ui <- fluidPage(
uiOutput("moreControls")
)
server <- function(input, output) {
output$moreControls <- renderUI({
tagList(
sliderInput("n", "N", 1, 1000, 500),
textInput("label", "Label")
)
})
}
shinyApp(ui, server)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.