animate_css | R Documentation |
Animate.css is a popular collection of CSS animations. It contains "a bunch of cool, fun, and cross-browser animations for you to use in your projects. Great for emphasis, home pages, sliders, and general just-add-water-awesomeness."
use_animate_css(minified = FALSE, xaringan = TRUE)
html_dependency_animate_css(minified = FALSE, xaringan = TRUE)
use_animate_all(
style = c("slide_left", "slide_right", "slide_up", "slide_down", "roll", "fade")
)
minified |
Should the minified or full CSS source be used? |
xaringan |
When |
style |
Animation style to be used for all slides.
|
An htmltools::tagList()
with the tile view dependencies, or an
htmltools::htmlDependency()
.
use_animate_css()
: Use animate.css in your xaringan slides.
html_dependency_animate_css()
: Returns an htmltools::htmlDependency()
with the tile
view dependencies. Most users will want to use use_animate_css()
.
use_animate_all()
: Use a default animation for all slides. Sets coupled
in an out animations for all slides that can be disabled on individual
slides by adding the class .no-animation
.
To add animate.css to your xaringan presentation, add the following code chunk to your slides' R Markdown file.
```{r xaringan-animate, echo=FALSE} xaringanExtra::use_animate_css() ``` --- class: animated fadeInLeft slideOutRight This slide fades in from the left and slides out to the right!
Note that when xaringan = TRUE
, as is the default, out animations are
only applied to slides that are exiting so that you can specify both in
and out behavior of each slide.
Or use use_animate_all()
to set default in and out animations for all
slides. Animations can be disabled for individual slides by adding the
class .no-animation
to the slide.
```{r xaringan-animate, echo=FALSE} xaringanExtra::use_animate_all("slide_left") ```
See animate.css for a full list of animations.
use_animate_css()
html_dependency_animate_css()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.