Description Usage Arguments Examples
A text input only triggered by hiting Enter or clicking search button
1 2 |
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. |
btnSearch |
An icon for the button which validate the search. |
btnReset |
n icon for the button which reset the search. |
width |
The width of the input, e.g. '400px', or '100%'. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ## Not run:
if (interactive()) {
ui <- fluidPage(
tags$h1("Search Input"),
br(),
searchInput(
inputId = "search", label = "Enter your text",
placeholder = "A placeholder",
btnSearch = icon("search"),
btnReset = icon("remove"),
width = "450px"
),
br(),
verbatimTextOutput(outputId = "res")
)
server <- function(input, output, session) {
output$res <- renderPrint({
input$search
})
}
shinyApp(ui = ui, server = server)
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.