Shiny UI
The user interface (UI) object controls the layout and appearance of the Shiny app.
Load Shiny:
The UI is defined as:
The fluidPage()
function renders the main Shiny interface,
a range slider input is nested inside alongside the plot output.
The slider with ID "obs"
controls the number of observations
(range between 1 and 5000, value set to 100).
The plot with ID "distPlot"
will show the distribution of the
random numbers (we'll see this later).
If we print the ui
object, we get the following HTML output:
You can see here the fluid container, a column, and inside the single column layout the range slider and the plot.
This is going to be added to the body of the HTML page rendered by Shiny. The final HTML page will also contain all the JavaScript and CSS dependencies required to make the app interactive and styled properly.