Create text field with add-on.
Arguments
- inputId
The
input
slot that will be used to access the value.- label
Display label for the control, or
NULL
for no label.- value
Initial value..
- placeholder
A character string giving the user a hint as to what can be entered into the control.
- addon
An icon tag, created by
shiny::icon()
.- width
The width of the input : 'auto', 'fit', '100px', '75%'.
Examples
## Only run examples in interactive R sessions
if (interactive()) {
shinyApp(
ui = fluidPage(
textInputAddon(inputId = "id", label = "Label", placeholder = "Username", addon = icon("at")),
verbatimTextOutput(outputId = "out")
),
server = function(input, output) {
output$out <- renderPrint({
input$id
})
}
)
}