searchInput | R Documentation |
Searching bar where shiny can search the content of interest after a click or enter.
searchInput(inputId, data, placeholder)
inputId |
The |
data |
Vector of values entered in the searching bar . |
placeholder |
Character, word, or string of characters that temporarily takes the place of the final data. |
A searching bar
## Not run:
## Only run examples in interactive R sessions
if (interactive()) {
ui <- fluidPage(
suppressDependencies('bootstrap'),
uiOutput('search'),
verbatimTextOutput('test')
)
server <- function(input, output) {
output$search <- renderUI({
searchInput('id_searching',
data = c('Anaconda', 'African darter', 'Fox', 'Wolf', 'Spider', 'Toad', 'Agouti'),
placeholder = 'Type a letter')
})
output$test <- renderPrint({
input$id_searching
})
}
shinyApp(ui, server)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.