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