Debian Codegraph @

man/numericInput.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/input-numeric.R
3 \name{numericInput}
4 \alias{numericInput}
5 \title{Create a numeric input control}
6 \usage{
7 numericInput(
8 inputId,
9 label,
10 value,
11 min = NA,
12 max = NA,
13 step = NA,
14 width = NULL,
15 ...,
16 updateOn = c("change", "blur")
17 )
18 }
19 \arguments{
20 \item{inputId}{The \code{input} slot that will be used to access the value.}
21
22 \item{label}{Display label for the control, or \code{NULL} for no label.}
23
24 \item{value}{Initial value.}
25
26 \item{min}{Minimum allowed value}
27
28 \item{max}{Maximum allowed value}
29
30 \item{step}{Interval to use when stepping between min and max}
31
32 \item{width}{The width of the input, e.g. \code{'400px'}, or \code{'100\%'};
33 see \code{\link[=validateCssUnit]{validateCssUnit()}}.}
34
35 \item{...}{Ignored, included to require named arguments and for future
36 feature expansion.}
37
38 \item{updateOn}{A character vector specifying when the input should be
39 updated. Options are \code{"change"} (default) and \code{"blur"}. Use \code{"change"} to
40 update the input immediately whenever the value changes. Use \code{"blur"}to
41 delay the input update until the input loses focus (the user moves away
42 from the input), or when Enter is pressed (or Cmd/Ctrl + Enter for
43 \code{\link[=textAreaInput]{textAreaInput()}}).}
44 }
45 \value{
46 A numeric input control that can be added to a UI definition.
47 }
48 \description{
49 Create an input control for entry of numeric values
50 }
51 \section{Server value}{
52
53 A numeric vector of length 1.
54 }
55
56 \examples{
57 ## Only run examples in interactive R sessions
58 if (interactive()) {
59
60 ui <- fluidPage(
61 numericInput("obs", "Observations:", 10, min = 1, max = 100),
62 verbatimTextOutput("value")
63 )
64 server <- function(input, output) {
65 output$value <- renderText({ input$obs })
66 }
67 shinyApp(ui, server)
68 }
69
70 }
71 \seealso{
72 \code{\link[=updateNumericInput]{updateNumericInput()}}
73
74 Other input elements:
75 \code{\link{actionButton}()},
76 \code{\link{checkboxGroupInput}()},
77 \code{\link{checkboxInput}()},
78 \code{\link{dateInput}()},
79 \code{\link{dateRangeInput}()},
80 \code{\link{fileInput}()},
81 \code{\link{passwordInput}()},
82 \code{\link{radioButtons}()},
83 \code{\link{selectInput}()},
84 \code{\link{sliderInput}()},
85 \code{\link{submitButton}()},
86 \code{\link{textAreaInput}()},
87 \code{\link{textInput}()},
88 \code{\link{varSelectInput}()}
89 }
90 \concept{input elements}