The use of tags in UI.R
tags
is an object of type list that is automatically generated inside Shiny applications, which enables the insertion of HTML tags within a user interface generated in UI.R
. This basically contains a list of functions that will transform the string argument to the content of the tag used, for example, see the following:
tags$pre("Text inside a pre tag")
This generates the following tag:
<pre>Text inside a pre tag</pre>
Note
The complete list of tags can be found at http://shiny.rstudio.com/articles/tag-glossary.html.
Attributes can be passed to any of the functions in tags by passing them as arguments, for example:
tags$pre(align="right","Text inside a pre tag")
This will be turned into the following HTML:
<pre align="right">Text inside a pre tag</pre>
In the following UI.R
code, the previous piece of code is included. This generates a pre-tag with the text before the number insertion widget:
library(shiny) # Starting line shinyUI(fluidPage( #...