animate_css {xaringanExtra} | R Documentation |
Animate.css
Description
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."
Usage
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")
)
Arguments
minified |
Should the minified or full CSS source be used? |
xaringan |
When |
style |
Animation style to be used for all slides.
|
Value
An htmltools::tagList()
with the tile view dependencies, or an
htmltools::htmlDependency()
.
Functions
-
use_animate_css()
: Use animate.css in your xaringan slides. -
html_dependency_animate_css()
: Returns anhtmltools::htmlDependency()
with the tile view dependencies. Most users will want to useuse_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
.
Usage
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") ```
References
See animate.css for a full list of animations.
Examples
use_animate_css()
html_dependency_animate_css()