navInputs: Standard inputs

navInputsR Documentation

Description

Full-width inputs for sidebars and tabs. Each is a thin wrapper around a 'shiny', 'bslib', 'shinyWidgets' or 'colourpicker' input, uses the same argument names, and takes an optional tooltipText that adds an info icon to the label (see addTooltip()).

Usage

navButton(inputId, label, tooltipText = NA)

navSelect(
  inputId,
  label,
  choices = NULL,
  selected = choices[1],
  multiple = FALSE,
  create = FALSE,
  tooltipText = NA
)

navUpload(inputId, label, multiple = FALSE, tooltipText = NA)

navCheckbox(inputId, label, value = FALSE, tooltipText = NA)

navDownload(inputId, label, tooltipText = NA)

navText(inputId, label, value = "", tooltipText = NA)

navNumeric(inputId, label, value = 1, min = NA, max = NA, tooltipText = NA)

navColor(inputId, label, value = "white", tooltipText = NA)

navDate(inputId, label, range = FALSE, tooltipText = NA)

Arguments

inputId

The input's ID. Read it in the server as ⁠input$<inputId>⁠.

label

Label shown above or beside the input.

tooltipText

Optional text for an info tooltip on the label.

choices

Choices to offer. Can be left NULL and filled in later from the server with shiny::updateSelectizeInput().

selected

Choices selected at start. Defaults to the first choice.

multiple

TRUE to allow more than one choice (navSelect()) or file (navUpload()).

create

TRUE to let the user type in options that aren't in choices.

value

Starting value: text for navText(), a number for navNumeric(), TRUE/FALSE for whether navCheckbox() starts on, and a color name or hex code for navColor().

min, max

Smallest and largest allowed values. NA for no limit.

range

TRUE to pick a start and end date, FALSE for one date.

Details

Function Builds Read in the server as
navButton() bslib::input_task_button() input$id (click count)
navSelect() shiny::selectizeInput() input$id (chosen values)
navUpload() shiny::fileInput() input$id$datapath, input$id$name
navDownload() shiny::downloadButton() pair with output$id <- downloadHandler(...)
navCheckbox() bslib::input_switch() input$id (TRUE/FALSE)
navText() shiny::textInput() input$id
navNumeric() shiny::numericInput() input$id
navColor() colourpicker::colourInput() input$id (hex color)
navDate() shinyWidgets::airDatepickerInput() input$id (one or two dates)

Value

A 'shiny' tag (or tag list) to place in the UI.

Examples

navButton("runData", "Run analysis", tooltipText = "Upload data first")
navSelect("groups", "Pick groups", choices = c("Control", "Treated"),
          multiple = TRUE)
navUpload("dataUpload", "Upload a CSV")
navDownload("resultsDownload", "Download results")
navCheckbox("logScale", "Use a log scale")
navText("plotTitle", "Plot title")
navNumeric("alpha", "Significance cutoff", value = 0.05, min = 0, max = 1)
navColor("pointColor", "Point color", value = "#D55E00")
navDate("dates", "Date range", range = TRUE)

EZRShiny documentation built on Oct. 10, 2026, 5:08 p.m.