Description Usage Arguments Details Value See Also Examples
View source: R/input-searchbar.R
Create a textInput-like searchbar which can search through and highlight the user's input within another element.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
inputId |
The |
contextId |
The |
value |
Initial value. |
label |
Display label for the control, or |
width |
The width of the input, e.g. |
placeholder |
A character string giving the user a hint as to what can be entered into the control. Internet Explorer 8 and 9 do not support this option. |
counter |
Include a counter to display the number of matches found. |
cycler |
Include an interface to cycle between the matches. |
scrollBehavior |
Behavior of scrolling with |
markOpts |
Options to be passed to mark.js; see configurator and the mark.js API for more details. |
quiet |
Supress any warning related to incorrect/invalid arguments. |
The counter and cycler arguments add additional functionality to the searchbar. The counter shows the user how many matches were found and the cycler gives the user an interface to cycle through each match with automatic scrolling (using either the buttons or Enter and Shift+Enter).
The markOpts are a list of options to pass to the underlying mark.js API, which handles finding and highlighting the matches in element identified by contextId.
A seachbar input control that can be added to a UI definition.
updateMarkOptions, configurator
1 2 3 4 5 6 7 8 9 10 | if (interactive()) {
ui <- fluidPage(
searchbar("sb", "text"),
textOutput("text")
)
server <- function(input, output) {
output$text <- renderText("Hello world!")
}
shinyApp(ui, server)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.