Session Ready
Exercise

Adding inputs

Inputs are Shiny's way of allowing users to interact with an app. For example, textInput() is used to let the user enter text and numericInput() lets the user select a number. In the next chapter we will see many other types of inputs.

To add an input to your app, simply add the input function inside fluidPage(). Recall from the video that all input functions have the same first two arguments: inputId and label.

Instructions
100 XP
  • Define the UI for the Shiny application.
  • Create a numeric input with ID "age" and a descriptive label of "How old are you?".
  • Create a text input with ID "name" and a label of "What is your name?".