
Last chance! 50% off unlimited learning
Sale ends in
This creates a default text input using Semantic UI. The input is available
under input[[input_id]]
.
text_input(
input_id,
label = NULL,
value = "",
type = "text",
placeholder = NULL,
attribs = list()
)textInput(
inputId,
label,
value = "",
width = NULL,
placeholder = NULL,
type = "text"
)
Input name. Reactive value is available under input[[input_id]]
.
character with label put on the left from the input
Pass value if you want to have default text.
Change depending what type of input is wanted. See details for options.
Text visible in the input when nothing is inputted.
A named list of attributes to assign to the input.
Input name. The same as input_id
.
The width of the input, eg. "40px"
The following type
s are allowed:
text The standard input
textarea An extended space for text
password A censored version of the text input
email A special version of the text input specific for email addresses
url A special version of the text input specific for URLs
tel A special version of the text input specific for telephone numbers
The inputs are updateable by using updateTextInput
or
updateTextAreaInput
if type = "textarea"
.
## Only run examples in interactive R sessions
if (interactive()) {
library(shiny)
library(shiny.semantic)
ui <- semanticPage(
uiinput(
text_input("ex", label = "Your text", type = "text", placeholder = "Enter Text")
)
)
server <- function(input, output, session) {
}
shinyApp(ui, server)
}
Run the code above in your browser using DataLab