Search gives you a way to quickly search for text on slides.
use_search(
position = c("bottom-left", "bottom-right", "top-left", "top-right"),
case_sensitive = FALSE,
show_icon = FALSE,
auto_search = TRUE
)html_dependency_search(
position = c("bottom-left", "bottom-right", "top-left", "top-right"),
case_sensitive = FALSE,
show_icon = FALSE,
auto_search = TRUE
)
style_search(
icon_fill = "rgba(128, 128, 128, 0.5)",
input_background = "rgb(204, 204, 204)",
input_foreground = "black",
input_border = "1px solid rgb(249, 38, 114)",
match_background = "rgb(38, 220, 249)",
match_foreground = "black",
match_current_background = "rgb(38, 249, 68)",
match_current_foreground = "black",
selector = ".search"
)
An htmltools::tagList() with the search dependencies, or an
htmltools::htmlDependency().
Where to place the search box.
If FALSE, ignores case of search and text.
Show the icon to open or close the search?
Search on each keystroke (TRUE) or on enter (FALSE)?
Color of search icon
Color of search input box background
Color of text in search input box
Border style of search input box
Color of match background (not current)
Color of match text (not current)
Color of current match background
Color of current match text
CSS selector specifying which search bar to update (for advanced or unusual uses only)
use_search(): Adds search to your xaringan slides.
html_dependency_search(): Returns an htmltools::htmlDependency() with the search
dependencies. Most users will want to use use_search().
style_search(): Style the search input.
To add search to your xaringan presentation, add the following code chunk to your slides' R Markdown file.
```{r xaringan-search, echo=FALSE}
xaringanExtra::use_search()
```
Original implementation by André Restivo