For Reveal.js and Quarto
In Powerpoint you can make slides with items that appear automatically and sequentially with effects. Appearance is a plugin for Reveal.js that does the same.
Appearance is easy to set up. It uses Animate.css by Daniel Eden for the animations, with some changes to allow for a non-animated state.
Let’s check out what Appearance does:
Inside fragments like this (click next):
Or as a fragment itself.
Appearance supports the standard entrance/in animations that Animate.css offers. Some examples:
Note: The shrinkInBlur animation was removed from Appearance, due to performance issues. For backwards compatibility, any element that used it will now use the shrinkIn
animation instead.
There are really only three steps:
The following command installs the plugin for use with Quarto:
Now refer to the plugin in the YAML:
For automatic markup, you can use the autoappear
option.
For manual markup, continue to the next slide.
Add an animation class to the elements that you would like to have animated when the slide appears:
This is the Quarto way of adding attributes. Check the regular demo to see how you do this in HTML.
To simplify it in any markup, you can use the autoappear option.
To nicely animate the words in a heading, or the letters of a word, add an animation class to it, and add a data-attribute for the kind of split you want:
Quarto will wrap the content of a list item in a span if you try to add attibutes to it. The bulletpoint or list number will then not be animated. Appearance can fix this:
Add data-appear-parent="true"
to the list item.
1. [This is a list item]{.animate__fadeInLeft data-appear-parent="true"}
2. [This is a list item]{.animate__fadeInLeft data-appear-parent="true"}
or globally like this:
You can change the delay, speed and start of animations easily:
Use data-delay="*"
on each element, where the wildcard is the delay in microseconds from the appearance of the previous element.
![](img/1.jpg){.animate__fadeInDown data-delay="0"}
![](img/2.jpg){.animate__fadeInDown data-delay="200"}
![](img/3.jpg){.animate__fadeInDown data-delay="160"}
![](img/4.jpg){.animate__fadeInDown data-delay="120"}
![](img/5.jpg){.animate__fadeInDown data-delay="80"}
data-delay
is automatically converted to CSS animation delay.
Use the speed classes from Animate.css to change the speed of the animation:
slower
slow
fast
faster
For words and letters, just set the speed and delay as described above. The smaller parts will inherit these settings. Set a data-container-delay="*"
for a different delay for the container, compared to the standard delay = 300
from the options.
You can use any of the following events:
This can also be set per-slide with data-attributes.
You can simplify the addition of animation classes:
Sometimes (for example with Markdown), adding classes to elements is a chore.
Appearance can automatically add animation classes to specific elements (tags or other selectors) in the presentation (with the option autoappear
) or per slide (with data-autoappear
).
You can use a simple JSON object, or more elaborate like this: '{"ul li": {"animation":"animate__fadeInLeft", "speed":"slow", "delay":"100"}}'
.
This will use the JSON object from the global autoelements option, even if autoappear is false.
You can also add a JSON object to the slide’s data-autoappear
, with specific elements, their animations class(es) as a string or an object with animations class(es), optional speed and optional delay.
And you can do the same for any animations that you would like to have on lines and words.
For more demos go to the Appearance plugin for Reveal.js. Not all of the options in the regular plugin are available in the Quarto plugin.