xarigan animation


One can create the incremental display of elements in xaringan slides using double dashes. I was wondering if there was a trick to make elements disappear "incrementally".
So something like this sequence of events:

  1. Show empty slide with title
  2. Show element A
  3. Hide element A
  4. Show element B
  5. Hide element B
  6. Show element C

Thanks for your help

I think you could manage something like that using the layout feature

See wiki page : https://github.com/yihui/xaringan/wiki/Slide-layouts

This is a remarkjs feature: https://github.com/gnab/remark/wiki/Markdown#layout

here is a dummy example:

title: "Presentation Ninja"
subtitle: "⚔<br/>with xaringan"
    lib_dir: libs
      highlightStyle: github
      highlightLines: true
      countIncrementalSlides: false

layout: true

# Title slide



Element A

Element B


Element C

layout: false

# New part

Hope it helps.

Thanks Christophe,

That could do the trick but the problem is that the slide number is still incremented

You need to explictely say to not count it. See count: false property https://github.com/gnab/remark/wiki/Markdown#count

1 Like


One word: awesome !!!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.