A text input. A group text input is an alternative text input. The group text input allows you to include static prefixes or buttons with a standard text input.
numberInput()
is a simple wrapper around textInput()
with type
set to
"number"
and explicit arguments for specifying a min value, max value, and
the step amount. Use updateTextInput()
to update a number input.
textInput(id, value = NULL, placeholder = NULL, ..., type = "text")numberInput(
id,
value = NULL,
placeholder = NULL,
...,
min = NULL,
max = NULL,
step = 1
)
updateTextInput(
id,
value = NULL,
enable = NULL,
disable = NULL,
valid = NULL,
invalid = NULL,
session = getDefaultReactiveDomain()
)
groupTextInput(
id,
value = NULL,
placeholder = NULL,
...,
type = "text",
left = NULL,
right = NULL
)
updateGroupTextInput(
id,
value = NULL,
enable = NULL,
disable = NULL,
valid = NULL,
invalid = NULL,
session = getDefaultReactiveDomain()
)
A character string specifying the id of the reactive input.
A character string or a value coerced to a character string specifying the default value of the textual input.
A character string specifying placeholder text for the
input, defaults to NULL
, in which case there is no placeholder text.
Additional named arguments passed as HTML attributes to the parent element or tag elements passed as child elements to the parent element.
One of "color
", "date
", "datetime-local
", "email
", "month
", "number
", "password
", "search
", "tel
", "text
", "time
", "url
" or "week
" specifying the type of text input, defaults to "text"
.
For details on a particular type please see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input.
A number specifying the minimum allowed value of the number input,
defaults to NULL
.
A number specifying the maximum allowed value of the number input,
defaults to NULL
.
A number specifying the increment step of the number input, defaults to 1.
One of values
specifying particular choices to enable or
TRUE
specifying the entire input is enabled, defaults to NULL
.
One of values
specifying particular choices to disable or
TRUE
specifying the entire input is disabled, defaults to NULL
.
A character string specifying a message to the user indicating
how the input's value is valid, defaults to NULL.
A character string specifying a message to the user
indicating how the input's value is invalid, defaults to NULL
.
A reactive context, defaults to getDefaultReactiveDomain()
.
A character vector specifying static addons or
buttonInput()
or dropdown()
elements specifying dynamic addons. Addons
affect the reactive value of the group input, see the Details section below
for more information.
left
is character or right
is character
If left
or right
are character vectors, then the group input functions
like a text input. The value will update and trigger a reactive event when
the text box is modified. The group input's reactive value is the
concatenation of the static addons specified by left
or right
and the
value of the text input.
left
is button or right
is button
The button does not change the value of the group input. However, the input no longer triggers event when the text box is updated. Instead the value is updated when a button is clicked. Static addons are still applied to the group input value.
left
is a dropdown or right
is a dropdown
The value of the group input does chance depending on the clicked dropdown menu item. The value of the input group is the concatenation of the dropdown input value, the value of the text input, and any static addons.
A character vector specifying static addons or
buttonInput()
or dropdown()
elements specifying dynamic addons. Addons
affect the reactive value of the group input, see the Details section below
for more information.
left
is character or right
is character
If left
or right
are character vectors, then the group input functions
like a text input. The value will update and trigger a reactive event when
the text box is modified. The group input's reactive value is the
concatenation of the static addons specified by left
or right
and the
value of the text input.
left
is button or right
is button
The button does not change the value of the group input. However, the input no longer triggers event when the text box is updated. Instead the value is updated when a button is clicked. Static addons are still applied to the group input value.
left
is a dropdown or right
is a dropdown
The value of the group input does chance depending on the clicked dropdown menu item. The value of the input group is the concatenation of the dropdown input value, the value of the text input, and any static addons.
Other inputs:
buttonGroupInput()
,
buttonInput()
,
checkbarInput()
,
checkboxInput()
,
chipInput()
,
fileInput()
,
formInput()
,
listGroupInput()
,
menuInput()
,
navInput()
,
radioInput()
,
radiobarInput()
,
rangeInput()
,
selectInput()
# NOT RUN {
### Default text input
textInput(id = "text")
### Default number input
numberInput(id = "num1")
### Specify `min`, `max`, and `step`
numberInput(
id = "num2",
min = 1,
max = 10,
step = 2
)
# }
Run the code above in your browser using DataLab