search | R Documentation |
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" )
position |
Where to place the search box. |
case_sensitive |
If |
show_icon |
Show the icon to open or close the search? |
auto_search |
Search on each keystroke ( |
icon_fill |
Color of search icon |
input_background |
Color of search input box background |
input_foreground |
Color of text in search input box |
input_border |
Border style of search input box |
match_background |
Color of match background (not current) |
match_foreground |
Color of match text (not current) |
match_current_background |
Color of current match background |
match_current_foreground |
Color of current match text |
selector |
CSS selector specifying which search bar to update (for advanced or unusual uses only) |
An htmltools::tagList()
with the search dependencies, or an
htmltools::htmlDependency()
.
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
https://github.com/arestivo/remark.search
use_search()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.