Debian Codegraph @

man/renderUI.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/shinywrappers.R
3 \name{renderUI}
4 \alias{renderUI}
5 \title{UI Output}
6 \usage{
7 renderUI(expr, env = parent.frame(), quoted = FALSE, outputArgs = list())
8 }
9 \arguments{
10 \item{expr}{An expression that returns a Shiny tag object, \code{\link[=HTML]{HTML()}},
11 or a list of such objects.}
12
13 \item{env}{The parent environment for the reactive expression. By default,
14 this is the calling environment, the same as when defining an ordinary
15 non-reactive expression. If \code{expr} is a quosure and \code{quoted} is \code{TRUE},
16 then \code{env} is ignored.}
17
18 \item{quoted}{If it is \code{TRUE}, then the \code{\link[=quote]{quote()}}ed value of \code{expr}
19 will be used when \code{expr} is evaluated. If \code{expr} is a quosure and you
20 would like to use its expression as a value for \code{expr}, then you must set
21 \code{quoted} to \code{TRUE}.}
22
23 \item{outputArgs}{A list of arguments to be passed through to the implicit
24 call to \code{\link[=uiOutput]{uiOutput()}} when \code{renderUI} is used in an
25 interactive R Markdown document.}
26 }
27 \description{
28 Renders reactive HTML using the Shiny UI library.
29 }
30 \details{
31 The corresponding HTML output tag should be \code{div} and have the CSS class
32 name \code{shiny-html-output} (or use \code{\link[=uiOutput]{uiOutput()}}).
33 }
34 \examples{
35 ## Only run examples in interactive R sessions
36 if (interactive()) {
37
38 ui <- fluidPage(
39 uiOutput("moreControls")
40 )
41
42 server <- function(input, output) {
43 output$moreControls <- renderUI({
44 tagList(
45 sliderInput("n", "N", 1, 1000, 500),
46 textInput("label", "Label")
47 )
48 })
49 }
50 shinyApp(ui, server)
51 }
52
53 }
54 \seealso{
55 \code{\link[=uiOutput]{uiOutput()}}, \code{\link[=outputOptions]{outputOptions()}}
56 }