Skip to contents

Creates a numeric input field that can be embedded inline within text. The field supports mouse drag and scroll wheel for value changes.

Usage

inlineNumericInput(
  inputId,
  value = 0,
  min = NA,
  max = NA,
  step = 0.1,
  sensitivity = 0.1
)

Arguments

inputId

The input identifier used to access the value in server logic

value

Initial value

min

Minimum value allowed (NA for no minimum)

max

Maximum value allowed (NA for no maximum)

step

Step size for increments/decrements

sensitivity

Drag sensitivity multiplier

Value

A Shiny tag list containing the input element and its dependencies

Examples

library(shiny)

ui <- fluidPage(
  p("Let x = ", inlineNumericInput("x"))
)

server <- function(input, output) {
  # Empty
}

if (interactive()) {
 shinyApp(ui, server)
}